Friday, May 17, 2024
 Popular · Latest · Hot · Upcoming
-6
rated 0 times [  0] [ 6]  / answers: 1 / hits: 20802  / 13 Years ago, sun, november 6, 2011, 12:00:00

I want to get the time on the computer of the person who is accessing my website. Should I use getHours() or getUTCHours()?


More From » html

 Answers
124

Short answer is it depends. If you want the hours as it displays on a clock for their timezone you will want getHours() as it returns the hours in their local time. If you want the hours in Universal Time (no timezone adjustment) then use getUTCHours()


[#89286] Thursday, November 3, 2011, 13 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
mckinleyk

Total Points: 730
Total Questions: 99
Total Answers: 99

Location: South Georgia
Member since Fri, Nov 13, 2020
4 Years ago
;