Strange timezone issue, when I set timezone to Alaska

by A.TNG » Fri, 23 Apr 2010 14:15:48 GMT


Sponsored Links
 Hi Guys,

I meet a strange timezone issue when I debug my application on
Android_2.1 SDK. I first start the emulator and set timezone to
"Alaska" in Settings. I also search the internet and find Alaska is in
GMT-9:00. If DST applied, it should be GMT-8:00. Then write some
sample code like:

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?

Any idea? Thanks for your help. BTW: I'm not in Alaska now.

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

--



Other Threads

1. how to get the view that is attached to an animation?

here is a pseudoCode

1. View myView = new View();
2. Animation myAnimation = new Animation();
3. myView.startAnimation(myAnimation);   // animation attached to the view
4. View myViewCopy = myAnimation.getAttachedView()

is there any way I can achieve the step in *line number 4*?

-- 

2. How to disable key press events!!

Dear all,

I need to disable the key events (any key pressed) for some predefined 
time. How the key pressed events be disabled?


Regards,
Pratik

--

3. Motorola XT800+

4. Building shapes with GL_TRIANGLE_STRIP or GL_TRIANGLE?

5. progress bar

6. Mod: Happy Easter

7. 'E-Mail Developer' button creating a lot of spam?