Difference between revisions of "Time Epochs"
(→Epochs) |
(→Epochs) |
||
| Line 28: | Line 28: | ||
| style="text-align:left;" | 1634658701 | | style="text-align:left;" | 1634658701 | ||
| <code>DATETIME(([time] / 1000000000) + 978307200, 'unixepoch')</code> | | <code>DATETIME(([time] / 1000000000) + 978307200, 'unixepoch')</code> | ||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
|- | |- | ||
| [[#Windows_FILETIME|Windows FILETIME]] | | [[#Windows_FILETIME|Windows FILETIME]] | ||
| Line 50: | Line 44: | ||
| | | | ||
| <code>DATETIME( ([time] / 10000000) - 11644473600, 'unixepoch')</code> | | <code>DATETIME( ([time] / 10000000) - 11644473600, 'unixepoch')</code> | ||
| − | |||
| − | |||
| − | |||
|- | |- | ||
| Unix | | Unix | ||
| Line 86: | Line 77: | ||
| <code>DATETIME([time] / 1000000000, 'unixepoch')</code> | | <code>DATETIME([time] / 1000000000, 'unixepoch')</code> | ||
|- | |- | ||
| + | | [[#UUID|UUID Type 1]] | ||
| + | | <code>15 Oct 1582</code> | ||
| + | | 100 Nanosecond | ||
| + | | [https://www.rfc-editor.org/rfc/rfc4122#section-4.1.4 Integer] | ||
| + | | | ||
| + | | | ||
| + | | | ||
| + | |- | ||
| + | | [[#Windows_COM|Windows COM]] | ||
| + | | <code>30 Dec 1899</code> | ||
| + | | | ||
| + | | | ||
| + | | | ||
| + | | | ||
| + | | | ||
| + | |- | ||
| + | | [[#Apple_Cocoa_Core|Apple]] | ||
| <code>01 Jan 2001</code> | | <code>01 Jan 2001</code> | ||
| − | | | + | | |
| + | | | ||
| + | | | ||
| + | | | ||
|} | |} | ||
Revision as of 06:27, 13 June 2026
Contents
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 | 10 | 1634658701 | DATETIME([time] + 978307200, 'unixepoch')
|
| Apple NSDate | 01 Jan 2001
|
1 Nanosecond | Integer | 10 | 1634658701 | 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.