PRTime

PRTime is the time and date format used by Mozilla in its software. This date and time format is used extensively within Firefox 3 and it is used in a number of places within the SQLite databases that Firefox 3 uses to record various items including its browsing history and bookmarks.

An example PRTime is: 1221842272303080
Which decodes to: 16:37:52 19/09/2008 UTC

PRTime Format

PRTime is very similar to Unix or POSIX time. As the table below shows:

Name Format Epoch Increments
PRTime 64-bit integer Midnight 1 January 1970 UTC Microseconds
Unix / POSIX 32-bit integer Midnight 1 January 1970 UTC Seconds


As a microsecond is one millionth of a second you can easily convert PRTime to UNIX time by dividing the PRTime value by 1,000,000.

In the example above of PRTime 1221842272303080, if we divide this by 1,000,000 we get 1221842272.30308. Now if we drop the fractional part we have the UNIX timestamp of 1221842272 which, as above, converts to Friday, September 19th 2008, 16:37:52 (UTC).

PRTime is used by the following columns in Firefox 3

Database Column Table
cookies.sqlite moz_cookies lastAccessed
downloads.sqlite moz_downloads startTime
downloads.sqlite moz_downloads endTime
places.sqlite moz_annos dateAdded
places.sqlite moz_annos lastModified
places.sqlite moz_bookmarks dateAdded
places.sqlite moz_bookmarks lastModified
places.sqlite moz_favicons expiration
places.sqlite moz_historyvisits visit_date
places.sqlite moz_items_annos dateAdded
places.sqlite moz_items_annos lastModified

Resources