]> git.madduck.net Git - etc/awesome.git/commitdiff

madduck's git repository

Every one of the projects in this repository is available at the canonical URL git://git.madduck.net/madduck/pub/<projectpath> — see each project's metadata for the exact URL.

All patches and comments are welcome. Please squash your changes to logical commits before using git-format-patch and git-send-email to patches@git.madduck.net. If you'd read over the Git project's submission guidelines and adhered to them, I'd be especially grateful.

SSH access, as well as push access can be individually arranged.

If you use my repositories frequently, consider adding the following snippet to ~/.gitconfig and using the third clone URL listed for each project:

[url "git://git.madduck.net/madduck/"]
  insteadOf = madduck:

doc/index: Initial commit
authordaurnimator <quae@daurnimator.com>
Sat, 23 Nov 2013 16:49:02 +0000 (11:49 -0500)
committerdaurnimator <quae@daurnimator.com>
Sat, 23 Nov 2013 16:49:02 +0000 (11:49 -0500)
doc/index.md [new file with mode: 0644]

diff --git a/doc/index.md b/doc/index.md
new file mode 100644 (file)
index 0000000..6c08c24
--- /dev/null
@@ -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).