Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

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 the current date and time based upon the user's location data.
  • time:new(). time:new() returns a new RFC 3339 datetime string from a string formatted as described in ISO8601 (v2000).
  • time:strftime(). time:strftime() returns a datetime string in a specified format following POSIX strftime conventions.
  • time:compare(). time:compare() 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.
  • No labels