std/time/timezone▲toc

Timezone support.

Can load timezone information from a time zone file using load-timezonesstd/time/timezone/load-timezones: (fname : ?path, url : ?string, download-delay : ?duration, download-timeout : ?duration, verbose : ?bool) -> <io,async> timezones. The format of that file is [packed json](packed json format. The latest version can be found at: https://​github.​com/​moment/​moment-​timezone/​blob/​develop/​data/​packed/​latest.​json.

val tzs = load-timezones()
println( now().time(tzs.timezone(“US/Pacific”)).show )
val zlocal = tzs.guess-local-timezone()
println( now().time(zlocal).show + “ (” + zlocal.tz-name + “)”)
println( now().time(tz-local()).show )
val tzs = load-timezonesstd/time/timezone/load-timezones: (fname : ?path, url : ?string, download-delay : ?duration, download-timeout : ?duration, verbose : ?bool) -> <io,async> timezones()
println( nowstd/time/chrono/now: () -> <utc,ndet> instant().time(tzs.timezone(“US/Pacific”)).show )
val zlocal = tzs.guess-local-timezonestd/time/timezone/guess-local-timezone: (tzs : timezones, default : ?maybe<timezone>) -> ndet timezone()
println( nowstd/time/chrono/now: () -> <utc,ndet> instant().time(zlocal).show + “ (” + zlocal.tz-name + “)”)
println( nowstd/time/chrono/now: () -> <utc,ndet> instant().time(tz-localstd/time/calendar/tz-local: () -> ndet timezone()).show )
.

Describes time zone information with a name, population count, and a list of periods.

Automatically generated. Retrieves the name constructor field of the timezone-infostd/time/timezone/timezone-info: V type.

Show time zone information.

A period in a timezone where a specific time zone offset holds.

The abstract timezonesstd/time/timezone/timezones: V represents time zone information.

Load a time zone information from a packed json format. Looks by default for the file fname (= "config/timezones.json" in the application directory). If the file is not present, it will be downloaded from url. The default url is:
https://​raw.​githubusercontent.​com/​moment/​moment-​timezone/​develop/​data/​packed/​latest.​json
Set the url to the empty string to suppress automatic downloading. If the file is older than download-delay (=4.weeksstd/time/duration/weeks: (n : int) -> duration) the file is automatically refreshed from url. The download-timeout (=10.seconds) gives the maximum time for downloading to finish. Set verbose to Truestd/core/True: bool to see trace messages.

Load time zone information from a packed json file. Looks by default for the file "config/timezones.json" in the application directory but an optional file name can be supplied. The latest version can be found at: https://​github.​com/​moment/​moment-​timezone/​blob/​develop/​data/​packed/​latest.​json.

Return all available IANA time zone identifiers.

Return a timezonestd/time/calendar/timezone: V given a IANA time zone identifier, for example tzs.timezone("US/Pacific") tzs.timezone("Asia/Singapore"). Return defaultstd/core/default: forall<a> (m : maybe<a>, nothing : a) -> a (= tz-utcstd/time/calendar/tz-utc: timezone) if the time zone is not found.