# HG changeset patch # User Rob Hoes CA-35038: Grace period should not be rounded to days Reverted the behaviour that rounds the expiry dates for grace licenses to day boundaries (expiry on midnight). Signed-off-by: Rob Hoes diff -r dc7320fcfd37 ocaml/license/v6client.ml --- a/ocaml/license/v6client.ml Thu Nov 12 15:31:27 2009 +0000 +++ b/ocaml/license/v6client.ml Tue Nov 17 14:47:38 2009 +0000 @@ -35,11 +35,6 @@ (* conversion to v6 edition codes *) let editions = ["enterprise", "ENT"; "platinum", "PLT"] - -(* round a date, given by Unix.time, to days *) -let round_to_days d = - let days = (int_of_float d) / (24 * 3600) in - (float_of_int days) *. 24. *. 3600. (* reset to not-licensed state *) let reset_state () = @@ -112,7 +107,7 @@ (* set expiry date *) let now = Unix.time () in if days_to_expire > -1 then - expires := (round_to_days now +. (float_of_int (days_to_expire * 24 * 3600))) + expires := now +. (float_of_int (days_to_expire * 24 * 3600)) else expires := never; (* check fist point *)