But if you're not using the DateTime structures on the Palm, the data will be just the 32 bit number (reversing bytes as necessary) representing seconds since 1/1/1904. If you subtract the difference in seconds between 1/1/1904 and 1/1/1970, you could load the resulting number directly into your Windows date/time structure. However, when you start playing around with seconds... Make sure you force Windows not to automatically compensate for your PC's time zone. I've gotten around this by forcing my application to assume it is working only with UTC/GSM. This works if the palm and PC times are set within the same time zone. Otherwise, your imported times will be an hour off during DST or standard time (depends on when you coded your application).
----- Original Message ----- From: "Max Bian" <[EMAIL PROTECTED]> To: "Palm Developer Forum" <[EMAIL PROTECTED]> Sent: Thursday, January 03, 2002 2:04 PM Subject: Re: Interpreting TimGetSeconds value on desktop > Hi. > > I had the problem a while ago. The timGerSeconds returns a UInt32. You must > be careful about how you transfer the data and how you use it. The problem is > the x86 PCs are small endian and the Palm is big endian system. > > After you are sure about that, you can use the struct from the DateTime.h and > grab the DataTime.c source code from the palm dev site. The functions are very > easy to port to other system. > > Max > > --- C Srinivas <[EMAIL PROTECTED]> wrote: > > Hi: > > > > I have a palm application which stores time as the > > number of seconds using TimGetSeconds. > > > > This information is transmitted to a server-side > > database which is in SQL Server and stored as a > > bigint. > > > > I am currently facing problem in interpreting the time > > number into a valid date on the server. > > > > Can anyone suggest any algorithm / method to interpret > > the time value returned by TimGetSeconds on a desktop? > > > > This might be pretty obvious, but it's sure got me > > stumped. > > > > Any advice / suggestions appreciated. > > > > Thanks in advance. > > > > csrins > > > > > > __________________________________________________ > > Do You Yahoo!? > > Send your FREE holiday greetings online! > > http://greetings.yahoo.com > > > > -- > > For information on using the Palm Developer Forums, or to unsubscribe, please > > see http://www.palmos.com/dev/tech/support/forums/ > > > ===== > -=-=-=-=-=-=-=-=-=-=-=-=-==-=-=-==-=-=-=-=-=-=-=-=-=-=-=-=-=- > Got Palm? > Get ExBox at http://www.weirdwww.com/ExBox to beam anything! > > __________________________________________________ > Do You Yahoo!? > Send your FREE holiday greetings online! > http://greetings.yahoo.com > > -- > For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/tech/support/forums/ > -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/tech/support/forums/
