May 12, 2004

oh how time flies...

IBM's mark davis has a proposal about "handling different binary formats of datetime". this is something i'd never given any thought to but one glance at table 1 (reproduced below) in the proposal makes me wonder why this hasn't come up before.

Table 1: Binary Time Scales

Source Datatype Unit Epoch
JAVA_TIME int64 milliseconds Jan 1, 1970
UNIX_TIME int32 seconds Jan 1, 1970
ICU4C double64 milliseconds Jan 1, 1970
WINDOWS_FILE_TIME int64 ticks (100 nanoseconds) Jan 1, 1601
WINDOWS_DATE_TIME int64 ticks (100 nanoseconds) Jan 1, 0001
MAC_OLD_TIME int32 seconds Jan 1, 1904
MAC_TIME ? seconds Jan 1, 2001
EXCEL_TIME ? days Dec 31, 1899
DB2_TIME ? days Dec 31, 1899


java and Unix while having the same epoch (origin) differ in datatype and units so they differ in accuracy and range. windows' time scales differ internally for OS vs file system (no snickering). at the current state of this proposal, he's chosen to use Windows datetime as a "universal 'pivot'". that gives a time scale range from 29,000 BC to 29,000 AD. i guess IBM really does take the long term view ;-)

if you want to provide feedback i guess you'll have to join the ICU mailing list.

so now you know.

0 Comments:

Post a Comment

<< Home