Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
Time stamp module floating around?
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2007-01-21 (09:24)
From: Nicolas George <>
Subject: Re: [Caml-list] Time stamp module floating around?
Le duodi 2 pluviôse, an CCXV, skaller a écrit :
> //Timestamp: 2007/1/12 18:36:37 UTC

I would strongly advise you tu use fixed-length fields with leading zeros:
the big advantage of using the year-month-day order, instead of
month-day-year or day-month-year, is that the lexical order of the string is
the same as the chronological order of the date. Using variable-length
fields breaks this. Furthermore, it makes it harder to parse the timestamp.

On the other hand, it is important not to forget "UTC".

While I am at it, I believe that yyyy-mm-dd is a more common format as

> //Timestamp: 2007/1/13 5:36:37 (local)

It is a shame that whoever designed the tm structure in the first place
forgot the tm_gmtoff field.


  Nicolas George