Skip to main content

Time APIs

Functions to help convert various time formats to UnixEpoch

timeNow() -> number​

Return current time in UnixEpoch seconds

filetimeToIso(filetime) -> string​

Convert Windows FILETIME to ISO 8801 string

ParamTypeDescription
filetimebigintFILETIME timestamp

cocoatimeToIso(cocoatime) -> string​

Convert macOS Cocoa time to ISO 8801 string

ParamTypeDescription
cocoatimenumberCocoa timestamp

hfsToIso(hfstime) -> string​

Convert macOS HFS+ time to ISO 8801 string

ParamTypeDescription
hfstimenumberHFS+ timestamp

oleToIso(oletime) -> numstringber​

Convert Windows OLE time to ISO 8801 string

ParamTypeDescription
oletimenumberOLE timestamp

webkitToIso(webkttime) -> string​

Convert browser WebKit time to ISO 8801 string

ParamTypeDescription
webkittimenumberWebKit timestamp

fatToIso(fattime) -> string​

Convert Windows FAT time bytes to ISO 8801 string

ParamTypeDescription
oletimeUint8ArrayFAT timestamp bytes

unixEpochToISO(timestamp) -> string​

Convert timestamp to ISO RFC 3339 string with millisecond precision.
Supports seconds, microseconds, milliseconds, and nanoseconds duration timestamps

ParamTypeDescription
timestampnumber or BigIntUnixEpoch timestamp. Can be seconds, microseconds, milliseconds, or nanoseconds