package fmlib_browser

  1. Overview
  2. Docs

Module Fmlib_browser.TimeSource

Posix Time

Posix time is the number of milliseconds passed since the beginning of the unix epoch i.e. since 1.1.1970 in utc i.e. universal coordinated time.

In order to get the time in your time zone you need a time zone.

Sourcemodule Zone : sig ... end

Time zone

Sourcetype t
Sourceval zero : t

1.1.1970 in utc.

In order to get a year, month, ... you need the utc time and the time zone you are in.

Sourceval year : t -> Zone.t -> int

year time zone The year of time in zone.

Sourceval month : t -> Zone.t -> int

month time zone The month of time in zone.

January is month 0.

Sourceval day_of_month : t -> Zone.t -> int

day_of_month time zone The day of the month of time in zone.

First day of the month is day 0.

Sourceval hour : t -> Zone.t -> int

0 - 23

Sourceval minute : t -> Zone.t -> int

0 - 59

Sourceval second : t -> Zone.t -> int

0 - 59

Sourceval milli_second : t -> Zone.t -> int

0 - 999

OCaml

Innovation. Community. Security.