You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Original bug ID: 1882 Reporter: administrator Status: closed Resolution: fixed Priority: normal Severity: minor Category: ~DO NOT USE (was: OCaml general)
Unix.mktime is documented as taking a tm struct. However, this tm struct uses a
bool for tm_isdst. mktime itself will accept three values for this field (1, 0,
or -1 for yes, no, and figure-it-out). I believe this functionality is
important because I typically don't know whether dst is in effect when parsing a
date, so I rely on mktime to just do the right thing.
The text was updated successfully, but these errors were encountered:
Unix.mktime is documented as taking a tm struct. However, this tm
struct uses a bool for tm_isdst. mktime itself will accept three
values for this field (1, 0, or -1 for yes, no, and figure-it-out).
I believe this functionality is important because I typically don't
know whether dst is in effect when parsing a date, so I rely on
mktime to just do the right thing.
Actually, Unix.mktime ignores the tm_isdst boolean field of its
argument, and calls mktime() with dst = -1. So, you get the behavior
you expect. Perhaps the documentation should mention this.
Original bug ID: 1882
Reporter: administrator
Status: closed
Resolution: fixed
Priority: normal
Severity: minor
Category: ~DO NOT USE (was: OCaml general)
Bug description
Full_Name: Dustin Sallings
Version: ocaml 3.06
OS: MacOS X/Linux/NetBSD
Submission from: sjc-dist3-e3.2wire.com (63.203.253.2)
Unix.mktime is documented as taking a tm struct. However, this tm struct uses a
bool for tm_isdst. mktime itself will accept three values for this field (1, 0,
or -1 for yes, no, and figure-it-out). I believe this functionality is
important because I typically don't know whether dst is in effect when parsing a
date, so I rely on mktime to just do the right thing.
The text was updated successfully, but these errors were encountered: