Difference between revisions of "Time Epochs"

From truxwiki.com
Jump to navigation Jump to search
Line 25: Line 25:
 
| 1 Nanosecond
 
| 1 Nanosecond
 
| Integer
 
| Integer
| 10
+
| 18
| style="text-align:left;" | 1634658701
+
| style="text-align:left;" | 656351501948449001
 
| <code>DATETIME(([time] / 1000000000) + 978307200, 'unixepoch')</code>
 
| <code>DATETIME(([time] / 1000000000) + 978307200, 'unixepoch')</code>
 
|-
 
|-

Revision as of 06:33, 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.

Name Epoch Clock Tick Data Type Digits Sample SQLite
Apple NSDate 01 Jan 2001 1 Second Integer 9 656351501 DATETIME([time] + 978307200, 'unixepoch')
Apple NSDate 01 Jan 2001 1 Nanosecond Integer 18 656351501948449001 DATETIME(([time] / 1000000000) + 978307200, 'unixepoch')
Windows FILETIME 01 Jan 1601 100 Nanosecond Integer 18 132790891019480000 DATETIME( ([time] / 10000000) - 11644473600, 'unixepoch')
Chrome 01 Jan 1601 1 Microsecond Integer 10 DATETIME( ([time] / 10000000) - 11644473600, 'unixepoch')
Unix 01 Jan 1970 1 Second Integer 10 1634658701 DATETIME([time], 'unixepoch')
Unix 01 Jan 1970 1 Millisecond Integer 13 1634658701948 DATETIME([time] / 1000, 'unixepoch')
Unix 01 Jan 1970 1 Microsecond Integer 16 1634658701948449 DATETIME([time] / 1000000, 'unixepoch')
Unix 01 Jan 1970 1 Nanosecond Integer 19 1634658701948449001 DATETIME([time] / 1000000000, 'unixepoch')
UUID Type 1 15 Oct 1582 100 Nanosecond Integer
Windows COM 30 Dec 1899
Apple 01 Jan 2001

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.