mosml
mosml copied to clipboard
Date does not handle time zones correctly
The implementation of Date does not handle time zones correctly in all cases. Example:
- Date.fmt "%H:%M %Z" (Date.fromTimeUniv (Time.now()));
> val it = "15:20 CET" : string
I believe CET ought to be GMT or UTC.
Another example (executed in a non-UTC time-zone):
- Date.offset(Date.fromTimeLocal(Time.now()));
> val it = NONE : time option
I believe this is correct, though weird. NONE represents the local time-zone, as per http://mlton.org/basis/date.html
Ah, yes you are right. But the original example still stand as an example of something wrong.