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. User login from mobile app

Hello,

I am planning to write a android application that logs into a remote user
database. Once logged in the user can perform multiple tasks. I need some
guidance on the technologies I need to read up to achieve it. I read up
OpenLDAP, and Unbound API's for LDAP. Soon I will prototype the LDAP way.

I was thinking of providing the OpenID way of login. So anyone with a openID
login should be able to use my services. Any guidance there ?

One last approach I had was using a MySQL database.

Its a simple task. Multiple applications I use today on my Nokia phone do
user login. So I know its possible. I just need some guidance on where to
start looking/reading.

Thanks in advance
siddha...@mcon

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

2. where is the definition of member functions in the struct audio_track_cblk_t

Hi All,

I don't know whether there is someone who have a look at the structure
audio_track_cblk_t, which is at
frameworks/base/include/private/media/AudioTrackShared.h
struct audio_track_cblk_t
{

    // The data members are grouped so that members accessed
frequently and in the same context
    // are in the same line of data cache.
                Mutex       lock;
                Condition   cv;
    volatile    uint32_t    user;
    volatile    uint32_t    server;
                uint32_t    userBase;
                uint32_t    serverBase;
    void*       buffers;
    uint32_t    frameCount;
    // Cache line boundary
    uint32_t    loopStart;
    uint32_t    loopEnd;
    int         loopCount;
    volatile    union {
                    uint16_t    volume[2];
                    uint32_t    volumeLR;
                };
                uint16_t    sampleRate;
                uint16_t    channels;
                int16_t     flowControlFlag; // underrun (out) or
overrrun (in) indication
                uint8_t     out;        // out equals 1 for AudioTrack
and 0 for AudioRecord
                uint8_t     forceReady;
                uint16_t    bufferTimeoutMs; // Maximum cumulated
timeout before restarting audioflinger
                uint16_t    waitTimeMs;      // Cumulated wait time
                // Padding ensuring that data buffer starts on a cache
line boundary (32 bytes).
                // See AudioFlinger::TrackBase constructor
                int32_t     Padding[3];

                            audio_track_cblk_t();
                uint32_t    stepUser(uint32_t frameCount);
                bool        stepServer(uint32_t frameCount);
                void*       buffer(uint32_t offset) const;
                uint32_t    framesAvailable();
                uint32_t    framesAvailable_l();
                uint32_t    framesReady();
};
I try to find where is the definition of framesReady(), stepUser() and
etc, but I cann't get the location, anybody can tell me?

Thanks a lot
--~--~---------~--~----~------------~-------~--~----~
unsubscribe: android-porting+unsubscr...@googlegroups.com
website: 

3. How to use Graphics.VCENTER|Graphics.HCENTER

4. Binder Thread issue.

5. How to catch BOOT_COMPLETED_ACTION from an IntentReceiver

6. Lising of the available AT-commands on an HTC G1 ?

7. PopupWindow Dismissal