Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
11 lines (9 sloc) 356 Bytes
open Core.Std
let () =
printf "Pick a timezone: %!";
match In_channel.input_line stdin with
| None -> failwith "No timezone provided"
| Some zone_string ->
let zone = Time.Zone.find_exn zone_string in
let time_string = Time.to_string_abs (Time.now ()) ~zone in
printf "The time in %s is %s.\n%!" (Time.Zone.to_string zone) time_string