In the Microsoft Spec, DATETIME
is represented as 2 32-bit integers: low
and high
The FILETIME structure is a 64-bit value that represents the number of 100-nanosecond intervals that have elapsed since January 1, 1601, Coordinated Universal Time (UTC). typedef struct _FILETIME { DWORD dwLowDateTime; DWORD dwHighDateTime; } FILETIME, *PFILETIME, *LPFILETIME; dwLowDateTime: A 32-bit unsigned integer that contains the low-order bits of the file time. dwHighDateTime: A 32-bit unsigned integer that contains the high-order bits of the file time.
For example, here is the long 130280867040000000
So the the high and low computed with
int high = (int)(fullval >> 32);
int low = (int)fullval;
so high = 30333378
and low = 552794112
How do I compute these to a Java 8 Instant?