calendar data read sqlite extion

For discussing the Mozilla Calendar, Sunbird and Lightning projects.
Post Reply
glda19
Posts: 31
Joined: April 8th, 2009, 9:34 am

calendar data read sqlite extion

Post by glda19 »

hi
When i read the calendar data with the sqllite exteion i see thime_created 1378151594000000 what thime is that ???
What is the formula to convert that to date and time
morat
Posts: 6406
Joined: February 3rd, 2009, 6:29 pm

Re: calendar data read sqlite extion

Post by morat »

Lightning tracks time using a method called PRTime.

Unix time is in seconds.
JS time is in milliseconds.
PRTime is in microseconds.

Unix time = PRTime / 1000000

http://developer.mozilla.org/docs/PRTime
http://www.onlineconversion.com/unix_time.htm

e.g.

Unix time: 1378151594
JS time: 1378151594000
PRTime: 1378151594000000

You can use scratchpad to display the locale string.

Code: Select all

var d = new Date(1378151594000);
d.toLocaleString();

http://developer.mozilla.org/en-US/docs ... Scratchpad
User avatar
ssitter
Posts: 2495
Joined: October 19th, 2007, 12:24 am
Location: Germany

Re: calendar data read sqlite extion

Post by ssitter »

You could export the calendar to the iCalendar text format that is way more readable than the SQLite database entries. The iCalendar format is described in https://tools.ietf.org/html/rfc5545. By comparing data in the text file with data in the database you might get more of its meaning.
Post Reply