|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| ||||||||||||||||||||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
||||
|
||||
|
how to change GMT zone in Date object?
hi... there's a parameter, like getHours, getMinutes, etc, to change/set the GMT zone in a Date object?
tnkx any help! |
|
#2
|
|||
|
|||
|
You can use the getTimezoneOffset() function to find the difference between the user's local time and GMT and then add or subtract what ever offset you want.
http://www.google.com/search?q=JavaScript+date |
|
#3
|
||||
|
||||
|
hey, thanks.
i've already solve this problem with getUTCDate() wich returns the local hour. but this solution cannot be applied to any gmt zone, cause i must know the user zone to subtract the difference. your solution gets the difference, allowing the script to be more efficient. thanks again :] |
![]() |
| Viewing: Dev Articles Community Forums > Programming > JavaScript Development > how to change GMT zone in Date object? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|