From a287461698368fc02eeeb8f5611d7ef3d9b2df4d Mon Sep 17 00:00:00 2001 From: silva guimaraes Date: Sat, 28 Jun 2025 22:42:55 -0300 Subject: [PATCH] fix wrong time conversions --- bin/main.ml | 4 ++-- lib/lib.ml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/bin/main.ml b/bin/main.ml index ff9e2bf..0f28e5a 100644 --- a/bin/main.ml +++ b/bin/main.ml @@ -128,8 +128,8 @@ let pp (day : Unix.tm) matches = let f () = let fetched = Lib.fetch_all tournaments in - let today = Unix.time () |> Unix.gmtime in - let tomorrow = Unix.time () +. (60. *. 60. *. 24.) |> Unix.gmtime in + let today = Unix.time () |> Unix.localtime in + let tomorrow = Unix.time () +. (60. *. 60. *. 24.) |> Unix.localtime in let header = "### schedules" in let schedules = match (pp today fetched, pp tomorrow fetched) with diff --git a/lib/lib.ml b/lib/lib.ml index 7bc3844..509dcd7 100644 --- a/lib/lib.ml +++ b/lib/lib.ml @@ -228,7 +228,7 @@ let fetch_matches ctx = ctx.id ctx.season order |> get |> Yojson.Safe.from_string |> api_events_of_yojson |> matches_of_api_events - with Failure str when str = "Not Found" -> [] + with Failure str when str = "Not Found" -> [] (* FIXME *) in Tournament.make ctx (List.append (g "last") (g "next"))