From 86473212afa1a64fa691d4562902e916538dd47a Mon Sep 17 00:00:00 2001 From: daurnimator Date: Sat, 23 Nov 2013 11:49:02 -0500 Subject: [PATCH] doc/index: Initial commit --- doc/index.md | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 doc/index.md diff --git a/doc/index.md b/doc/index.md new file mode 100644 index 0000000..6c08c24 --- /dev/null +++ b/doc/index.md @@ -0,0 +1,26 @@ +# `luatz` + +Requiring the base luatz module will give you a table of commonly used functions and submodules. + +The table includes the following sub modules, which have their own documentation: + + - `parse`: Parses common date/time formats + - `timetable`: Class for date/time objects supporting normalisation + + +## `time ( )` + +Returns the current unix timestamp using the most accurate source available. +See `gettime` for more information. + + +## `get_tz ( timezone_name )` + +Returns a timezone object (see `tzinfo` documentation) for the given `timezone_name`. +This uses the local zoneinfo database; names are usually of the form `Country/Largest_City`. + + +## `time_in ( timezone_name [, utc_ts] )` + +Returns the current time in seconds since 1970-01-01 0:00:00 in the given timezone +(as a string, e.g. "America/New_York") at the given UTC time (defaults to now). -- 2.39.5