Difference between revisions of "Time Epochs"

From truxwiki.com
Jump to navigation Jump to search
Line 45: Line 45:
 
! Clock Tick Units
 
! Clock Tick Units
 
! Example
 
! Example
 +
! SQLite
 
|-
 
|-
 
| style="text-align:center;" | 10
 
| style="text-align:center;" | 10
 
| One Second
 
| One Second
 
| style="text-align:left;" | 1634658701
 
| style="text-align:left;" | 1634658701
 +
| <code>DATETIME([time], 'unixepoch')</code>
 
|-
 
|-
 
| style="text-align:center;" | 13
 
| style="text-align:center;" | 13
 
| One Millisecond
 
| One Millisecond
 
| style="text-align:left;" | 1634658701948
 
| style="text-align:left;" | 1634658701948
 +
| <code>DATETIME([time] / 1000, 'unixepoch')</code>
 
|-
 
|-
 
| style="text-align:center;" | 16
 
| style="text-align:center;" | 16
 
| One Microsecond
 
| One Microsecond
 
| style="text-align:left;" | 1634658701948449
 
| style="text-align:left;" | 1634658701948449
 +
| <code>DATETIME([time] / 1000000, 'unixepoch')</code>
 
|-
 
|-
 
| style="text-align:center;" | 19
 
| style="text-align:center;" | 19
 
| One Nanosecond
 
| One Nanosecond
 
| style="text-align:left;" | 1634658701948449001
 
| style="text-align:left;" | 1634658701948449001
 +
| <code>DATETIME([time] / 1000000000, 'unixepoch')</code>
 
|}
 
|}
  

Revision as of 05:48, 13 June 2026

Epochs

Here's some of the time formats that Truxton can handle. Wikipedia has a better list. The Truxton software uses FILETIME for all time calculations.

Epoch Type
15 Oct 1582 UUID Type 1
01 Jan 1601 Windows FILETIME
Chrome
30 Dec 1899 Windows COM
01 Jan 1970 Unix Time
Firefox
01 Jan 2001 Apple

Apple Cocoa Core

Cocoa Core (aka NSDate) is the number of seconds (32-bit value) since 01 Jan 2001. The 64-bit version is the number of nanoseconds since 01 Jan 2001.

Chrome

Chrome stores the time as a 64-bit integer representing the number of microseconds since 01 Jan 1601.

Firefox

Firefox (PRTime) stores the time as a 64-bit integer representing the number of microseconds since 01 Jan 1970.

Unix Time

This is a 32-bit integer holding the number of clock ticks since 01 Jan 1970. You will see this value in a variety of ticks.

Hints

The Unix epoch can be stored in several different clock ticks.

Digits Clock Tick Units Example SQLite
10 One Second 1634658701 DATETIME([time], 'unixepoch')
13 One Millisecond 1634658701948 DATETIME([time] / 1000, 'unixepoch')
16 One Microsecond 1634658701948449 DATETIME([time] / 1000000, 'unixepoch')
19 One Nanosecond 1634658701948449001 DATETIME([time] / 1000000000, 'unixepoch')

UUID

A 60-bit integer holding the number of 100-nanosecond clock ticks since 15 Oct 1582.

Windows COM

Windows COM stores date time in a double (floating point) number representing the number of days since 30 Dec 1899.

Windows FILETIME

A 64-bit integer containing the number of 100-nanosecond clock ticks since 01 Jan 1601.