Author Topic: Decoding dates in datebook xml  (Read 1976 times)

b2bpro

  • Full Member
  • ***
  • Posts: 218
    • View Profile
    • http://
Decoding dates in datebook xml
« on: October 28, 2004, 10:04:46 pm »
Anyone know the magic algorithm to decode the datetimes in the databook.xml file?

for instance start="1098745200"  means 2004 October 25, 7:00 pm.

How do these work?

carpman

  • Newbie
  • *
  • Posts: 14
    • View Profile
Decoding dates in datebook xml
« Reply #1 on: October 28, 2004, 10:51:34 pm »
Thats a unix timestamp, or seconds from standard epoch of 1/1/1970. You can verify that here...

b2bpro

  • Full Member
  • ***
  • Posts: 218
    • View Profile
    • http://
Decoding dates in datebook xml
« Reply #2 on: October 28, 2004, 11:01:07 pm »
Excellent - Thank you

zenyatta

  • Sr. Member
  • ****
  • Posts: 366
    • View Profile
    • http://
Decoding dates in datebook xml
« Reply #3 on: October 29, 2004, 04:53:59 am »
To be exact, the epoch is 00:00 1 January 1970 GMT - watch out for timezone differences when working with the numbers...

z.
SL-5500, 256MB Kingston CF card, 128MB EDGE SD card, Thomson HED-155 headphones
OpenZaurus 3.5.3 / Opie (kernel 64-0)