On Apr 23, 11:10 am, "A.TNG" <[email protected]> wrote:

> Since Alaska is in GMT-9:00, even doesn't include DST, getOffset(0)
> should return 32400000 (= 9*60*60*1000), right? I cannot understand
> why it returns 36000000 (=10*60*60*1000). If "36000000" is correct,
> that means Alaska is in GMT-10:00.

Well, for starters, it looks like you're using getOffset() wrong. From
the docs (http://developer.android.com/reference/java/util/
TimeZone.html#getOffset(long)), the parameter is "the date in
milliseconds since January 1, 1970 00:00:00 GMT". So unless you WANT
the TZ offset as of  Jan 1, 1970, you shouldn't be passing it a zero.
Try passing it the current timestamp and see what you get.

As for why it's giving you GMT-10? <shrug /> Perhaps Alaska's time
zone was GMT-10 in 1970. That's not inconsistent with the state's
latitude; the western Aleutians use GMT-10 in the winter, as does
Hawaii year-round.

String

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to