From e5168e1b4f205dfdca4ec731032a8e77310b313a Mon Sep 17 00:00:00 2001 From: Robur Date: Wed, 17 Nov 2021 14:44:41 +0000 Subject: [PATCH] Display timestamps without time zone offset, use Z instead to indicate time zone offset 0 --- lib/views.ml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/views.ml b/lib/views.ml index f0e4a3b..efd8b3f 100644 --- a/lib/views.ml +++ b/lib/views.ml @@ -1,6 +1,8 @@ open Tyxml.Html -let pp_ptime = Ptime.pp_human () +let pp_ptime ppf ptime = + let (y, m, d), ((hh, mm, ss), _) = Ptime.to_date_time ptime in + Fmt.pf ppf "%04d-%02d-%02d %02d:%02d:%02dZ" y m d hh mm ss let txtf fmt = Fmt.kstr txt fmt let a_titlef fmt = Fmt.kstr a_title fmt @@ -236,7 +238,7 @@ let job name platform readme builds = txtf " %s " build.platform; a ~a:[Fmt.kstr a_href "build/%a/" Uuidm.pp build.Builder_db.Build.uuid] [ - txtf "%a" (Ptime.pp_human ()) build.Builder_db.Build.start; + txtf "%a" pp_ptime build.Builder_db.Build.start; ]; txt " "; ] @ match main_binary with