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. Dynamically adding images to a gallery

Hello everybody

I'm trying to create a dynamic gallery, where the pictures are taken
from the links in a txt file. Since the txt file can be often updated,
there is a possibility that the amount of images in the gallery
changes every time the user would restart the app (or click on a
button). My question is now: Is this technically possible and if yes,
how could I implement such a feature?

I'd appreciate any help on this problem,

thanks a lot.


--~--~---------~--~----~------------~-------~--~----~

2. Anybody knows how to preload an application?

Dear all,
         i am finding all android preloaded applications are located
under /
system/app/. So i am wondering if there is way that we can preload our
own applications. Does it work that we just placed an app under /
system/app/?

--~--~---------~--~----~------------~-------~--~----~

3. Could I adjust cpufreq from framework API

4. Merging two apps

5. execption while loadling providers

6. Loading images from SDCard

7. Android and Epocrates