4 ms·
> 1. An instant in time - often represented as an integer number of milliseconds since January 1, 1970. POSIX time is actually not the number of seconds since
by taejo 10y ago
> 1. An instant in time - often represented as an integer number of milliseconds since January 1, 1970.
POSIX time is actually not the number of seconds since 00:00 UTC on January 1, 1970, but the 864000 times the number of days since January 1, 1970, plus the number of seconds since the start of the current day.
See "1. There are always 24 hours in a day" (or rather, there are always 60 seconds in a minute, since the leap second makes the last minute/hour of the day longer, so there are still 24 hours in the day)
- MarkMc 10y agoOK yes, it's more common to use POSIX 'ticks' to represent an instant in time. The point is: Type 1 is an instant in time, is independent of any timezone or calendar system, and is usually represented by an integer.
- deathanatos 10y ago> OK yes, it's more common to use POSIX 'ticks' to represent an instant in time. The point is: Type 1 is an instant in time I'm not sure what a "tick" is, but POSIX time often purports to be the number of seconds (or similar) since 1970, (and thus, represent an instant in time) but in practice it isn't; that's the point of the parent poster: it's precisely the definition that he or she gave. (It's the number of days times a constant, etc.) While usually POSIX time represents an instant in time, it becomes ambiguous during leap seconds, and duration calculations with POSIX times will almost invariably be just arithmetic on the underlying value, which is going to be wrong over certain intervals (any interval crossing a leap second). For the most part, nobody notices, but this is where and why weird bugs crop up.