Skip to content

Commit a1873fd

Browse files
committed
fix Time.to_sec_string example again
`Time.Zone.local` has been removed from the package `core`. The current version, 0.16.1, has a deprecation warning in its place. There is a platform-specific replacement in `core-unix`. To avoid requiring `core-unix`, let's change the time zone to UTC.
1 parent d937cf1 commit a1873fd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

code/guided-tour/main.topscript

+1-1
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ let log_entry maybe_time message =
147147
| Some x -> x
148148
| None -> Time.now ()
149149
in
150-
Time.to_sec_string time Time.Zone.local ^ " -- " ^ message
150+
Time.to_sec_string time ~zone:Time.Zone.utc ^ " -- " ^ message
151151
;;
152152
log_entry (Some Time.epoch) "A long long time ago";;
153153
log_entry None "Up to the minute";;

0 commit comments

Comments
 (0)