|Anonymous | Login | Signup for a new account||2014-04-21 14:32 CEST|
|Main | My View | View Issues | Change Log | Roadmap|
|View Issue Details|
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0006289||OCaml||OCaml standard library||public||2014-01-08 13:02||2014-01-09 15:58|
|Target Version||Fixed in Version|
|Summary||0006289: Unix.utimes with 0.0|
|Description||The documentation says "A time of [0.0] is interpreted as the current time". However the implementation makes the test|
if (times.actime || times.modtime)
if (tv.tv_sec || tv.tv_sec)
which has two unfortunate consequences
- If one time is 0.0 and the other one is not, 0.0 is not interpreted as the current time.
- If the time is 0.1 or any value in [0,1[ (thus not 0.0), it is interpreted as 0 because it is rounded down before the test.
Also, since the name is Unix.utimes and not Unix.utime, one should maybe prefer the utimes function (with its sub-second resolution) over the utime one when both are available.
Finally, one may also question the benefit of this convention. Maybe a function Unix.utimes_now would be a better replacement (Unix.utimes would thus have no exceptional behavior).
|Additional Information||See http://roscidus.com/blog/blog/2014/01/07/ocaml-the-bugs-so-far/ [^]|
|Tags||No tags attached.|
|2014-01-08 13:02||Christophe Troestler||New Issue|
|Copyright © 2000 - 2011 MantisBT Group|