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. Limitations on OTA download/installs from Android Market

Does anyone know whether the Android version that's shipping on the G1
has any limitations to being able to download and install an apk over
the air from a non-Android_market location? I heard somewhere that
only download/installs over USB were supported in an old version, not
sure which version is shipping on the G1.
Jay
--~--~---------~--~----~------------~-------~--~----~

2. openFileInput(FileName) does not support mark() and reset()

I open file "read.txt". He is in /data/data/$packageName/files/

FileInputStream fc= openFileInput("read.txt");
is=new DataInputStream(fc);

is.reset()  - not support!!!!!!!
fc.markSupported() - return false

Help!!!!!!!!!

I need is.reset().  What can I do?



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

3. error message "device offline" on android

4. UK Launch details

5. Android Group for Users

6. Free Code Camp this Weekend

7. SlideME: Testing of Apps