package lunar

  1. Overview
  2. Docs

Module Lunar_unixSource

Helpers for using Lunar with the Unix module, including functions to calculate the offset of the current time zone (of the process running the program) and the time t.

from_tm unix_tm converts a Unix datetime (Unix.tm) to a Lunar.Datetime.t.

Sourceval utc : float -> Lunar.Zoned_datetime.t

utc time returns the UTC zoned datetime corresponding to the given time.

Sourceval local : float -> Lunar.Zoned_datetime.t

local time returns the local zoned datetime corresponding to the given time.

Sourceval tz : float -> Lunar.Timezone.t

tz time compute the current tz-offset of the running process.

Sourceval tz_now : unit -> Lunar.Timezone.t

tz_now () returns the current timezone offset.

Sourceval utc_now : unit -> Lunar.Zoned_datetime.t

utc_now () returns the current datetime zoned to UTC.

Sourceval local_now : unit -> Lunar.Zoned_datetime.t

local_now () returns the current datetime zoned to tz time.