The time
library provides functions for determining the time and manipulating time values. KRE tries to determine the user's location and creates a time object that is localized for the user (i.e., in the user's time zone). The following functions are available:
time:now()
.time:now()
returns – returns the current date and time based upon the user's location data.time:new()
.time:new()
returns – returns a new RFC 3339 datetime string from a string formatted as described in ISO8601 (v2000).time:add(). time.add() adds – adds (or subtracts) a specific number of time units to a source string.
time:strftime()
.time:strftime()
returns – returns a datetime string in a specified format following POSIX strftime conventions.- time:atom(). time.atom() converts – converts a datetime string to an ATOM compatible form.
time:compare()
.time:compare()
takes – takes two datetime strings (ISO8601) and returns 1, 0, or [ms]1, depending on whether the first is before, the same, or after the second.
...