123456789101112131415161718192021222324open!Importopen!Import_timeincludeDateletof_tm(tm:Core_unix.tm)=create_exn~y:(tm.tm_year+1900)~m:(Month.of_int_exn(tm.tm_mon+1))~d:tm.tm_mday;;letformatdatepat=(* as long as you don't use anything silly like %z, the zone here is irrelevant, since
we use the same zone for constructing a time and formatting it *)letzone=(forceTime.Zone.local)inlettime=Time.of_date_ofday~zonedateTime.Ofday.start_of_dayinTime.formattimepat~zone;;letparse~fmts=Core_unix.strptime~fmts|>of_tm;;