From 2ebe1f37269e9bec23a3f0c2e6be956884c7ab92 Mon Sep 17 00:00:00 2001 From: Emil Mikulic Date: Mon, 14 Jan 2013 00:18:38 +1100 Subject: Add tztime module to support multiple different timezones. --- man/i3status.man | 33 +++++++++++++++++++++++++++++---- 1 file changed, 29 insertions(+), 4 deletions(-) (limited to 'man') diff --git a/man/i3status.man b/man/i3status.man index 3f7a924..d780363 100644 --- a/man/i3status.man +++ b/man/i3status.man @@ -56,7 +56,8 @@ order += "ethernet eth0" order += "battery 0" order += "cpu_temperature 0" order += "load" -order += "time" +order += "tztime local" +order += "tztime berlin" wireless wlan0 { format_up = "W: (%quality at %essid, %bitrate) %ip" @@ -83,8 +84,13 @@ run_watch VPN { pidfile = "/var/run/vpnc/pid" } -time { - format = "%Y-%m-%d %H:%M:%S" +tztime local { + format = "%Y-%m-%d %H:%M:%S" +} + +tztime berlin { + format = "%Y-%m-%d %H:%M:%S %Z" + timezone = "Europe/Berlin" } load { @@ -258,12 +264,31 @@ Gets the system load (number of processes waiting for CPU time in the last === Time -Formats the current system time. See +strftime(3)+ for the format. +Outputs the current time in the local timezone. +To use a different timezone, you can set the TZ environment variable, +or use the +tztime+ module. +See +strftime(3)+ for details on the format string. *Example order*: +time+ *Example format*: +%Y-%m-%d %H:%M:%S+ +=== TzTime + +Outputs the current time in the given timezone. +If no timezone is given, local time will be used. +See +strftime(3)+ for details on the format string. +The system's timezone database is usually installed in +/usr/share/zoneinfo+. +Files below that path make for valid timezone strings, e.g. for ++/usr/share/zoneinfo/Europe/Berlin+ you can set timezone to +Europe/Berlin+ +in the +tztime+ module. + +*Example order*: +tztime berlin+ + +*Example format*: +%Y-%m-%d %H:%M:%S %Z+ + +*Example timezone*: +Europe/Berlin+ + === DDate Outputs the current discordian date in user-specified format. See +ddate(1)+ for -- cgit v1.2.3