]> 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: Improve get_tz documentation around timezone_name
authordaurnimator <quae@daurnimator.com>
Sun, 24 Nov 2013 09:38:40 +0000 (04:38 -0500)
committerdaurnimator <quae@daurnimator.com>
Sun, 24 Nov 2013 09:38:40 +0000 (04:38 -0500)
doc/index.md

index 89cea6991837744849d14261cad3216b860adba1..d12f09be981686d09fc07f319d6726d0e50ca8f6 100644 (file)
@@ -14,15 +14,17 @@ Returns the current unix timestamp using the most accurate source available.
 See `gettime` for more information.
 
 
 See `gettime` for more information.
 
 
-## `get_tz ( timezone_name )`
+## `get_tz ( [timezone_name] )`
 
 Returns a timezone object (see `tzinfo` documentation) for the given `timezone_name`.
 
 Returns a timezone object (see `tzinfo` documentation) for the given `timezone_name`.
+If `timezone_name` is `nil` then the local timezone is used.
+
 This uses the local [zoneinfo database](https://www.iana.org/time-zones); 
 This uses the local [zoneinfo database](https://www.iana.org/time-zones); 
-names are usually of the form `Country/Largest_City`
+names are usually of the form `Country/Largest_City` e.g. "America/New_York".
 Check [wikipedia](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones) for an example list.
 
 
 ## `time_in ( timezone_name [, utc_ts] )`
 
 Check [wikipedia](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones) for an example list.
 
 
 ## `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).
+Returns the current time in seconds since 1970-01-01 0:00:00 in the given timezone as a string,
+(same semantics as `get_tz`) at the given UTC time (defaults to now).