X-Git-Url: https://git.madduck.net/etc/awesome.git/blobdiff_plain/66d1ace8410db940b6d1c74986626557ef8098ba..1d9261eb093db6618ae886483bdde36d701289de:/doc/tzinfo.md?ds=inline diff --git a/doc/tzinfo.md b/doc/tzinfo.md index 7ae1b55..8f95b5d 100644 --- a/doc/tzinfo.md +++ b/doc/tzinfo.md @@ -13,7 +13,10 @@ so the following details can be skipped over. The table contains a sequence of tables that describe the timezone at a given point using a `transition_time`: the unix timestamp (in UTC) that this definition starts, and -a `info` table, which contains information about the change at that point: +a `tt_info` object. + +A `tt_info` object contains information about a time offset; +and contains the following fields: - `gmtoff` (number) The offset from GMT (UTC) in seconds - `isdst` (boolean): If this change was declared as daylight savings @@ -22,18 +25,19 @@ a `info` table, which contains information about the change at that point: - `isstd` (boolean) - `isgmt` (boolean) -## `:find_current ( utc_ts )` -Returns the relevant `info` table at the given utc timestamp for the given UTC timestamp. +### `:find_current ( utc_ts )` + +Returns the relevant `tt_info` object for the given UTC timestamp in the timezone. -## `:localise ( utc_ts )` and `:localize ( utc_ts )` +### `:localise ( utc_ts )` and `:localize ( utc_ts )` Convert the given UTC timestamp to the timezone. Returns the number of seconds since unix epoch in the given timezone. -## `:utctime ( local_ts )` +### `:utctime ( local_ts )` Convert the given local timestamp (seconds since unix epoch in the time zone) to a UTC timestamp. This may result in ambigous results, in which case multiple values are returned.