fix wrong time conversions

This commit is contained in:
silva guimaraes 2025-06-28 22:42:55 -03:00
parent 3e9b5f483b
commit a287461698
2 changed files with 3 additions and 3 deletions

View file

@ -128,8 +128,8 @@ let pp (day : Unix.tm) matches =
let f () = let f () =
let fetched = Lib.fetch_all tournaments in let fetched = Lib.fetch_all tournaments in
let today = Unix.time () |> Unix.gmtime in let today = Unix.time () |> Unix.localtime in
let tomorrow = Unix.time () +. (60. *. 60. *. 24.) |> Unix.gmtime in let tomorrow = Unix.time () +. (60. *. 60. *. 24.) |> Unix.localtime in
let header = "### schedules" in let header = "### schedules" in
let schedules = let schedules =
match (pp today fetched, pp tomorrow fetched) with match (pp today fetched, pp tomorrow fetched) with

View file

@ -228,7 +228,7 @@ let fetch_matches ctx =
ctx.id ctx.season order ctx.id ctx.season order
|> get |> Yojson.Safe.from_string |> api_events_of_yojson |> get |> Yojson.Safe.from_string |> api_events_of_yojson
|> matches_of_api_events |> matches_of_api_events
with Failure str when str = "Not Found" -> [] with Failure str when str = "Not Found" -> [] (* FIXME *)
in in
Tournament.make ctx (List.append (g "last") (g "next")) Tournament.make ctx (List.append (g "last") (g "next"))