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,


Other Threads

1. Disabling landscape orientation for smallscreens

Hi All,

I have a board game application whose layout scales well for normal &
large screens (e.g. hvga, wvga) in the emulator. It does not scale too
well for smallscreens (e.g. qvga 120 dip), especially with landscape

How can I disable  landscape orientation only for smallScreens ? In
general, how can developer pick combinations of (orientation x screen
config) to support ?


- az


2. Multiple screen sizes problem ( layouts )

Hi all,

I have created layout-large and testing against android 2.0.1 WVGA.
however, its picking layout-normal.
Can anybody suggest me what I am doing wrong.
Even though, I have 3 layouts ( layout-normal, layout-large, layout-
Its always picking layout-normal.
why its so.
can anybody guide me.

i added properties to manifest file

          android:anyDensity="true" />


<uses-sdk android:targetSdkVersion="6" android:minSdkVersion="1"></




3. Fun with Google Map Uri Intents

4. Failed to reopen debug port for Selected Client to:

5. Why first call to Cursor.getCount() is so slow?

6. GLSurfaceview on top on a SurfaceView

7. SQlite Db problems