On Fri, Apr 23, 2010 at 4:42 PM, String <[email protected]> wrote:
> On Apr 23, 7:14 am, "A.TNG" <[email protected]> wrote:
>
>> TimeZone.getDefault().getOffset(0);  // returns 36000000 (= 10 * 60 * 60 * 
>> 1000)
>> TimeZone.getTimeZone("GMT-9:00").getOffset(0); // returns 32400000 (=
>> 9 * 60 * 60 * 1000)
>>
>> How does this happen? Why this same API getOffset with same parameter
>> returns different value?
>
> Simple: it's not the same parameter. The default TimeZone includes
> DST, but when you explicitly specify GMT-9:00, that doesn't include
> DST.
>

Hi String,

Thanks for your reply.

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.

-- 
Best Regards,
TANG Jiyu
Blog: http://jiyu.wordpress.com.cn/
ezkeypad: http://ezkeypad.tool100.com/

-- 
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