diff options
author | Hristo Venev <hristo@venev.name> | 2015-10-15 02:57:58 +0300 |
---|---|---|
committer | Hristo Venev <hristo@venev.name> | 2015-10-15 02:57:58 +0300 |
commit | d08a6b02b520f64a1a3b9285d4df9892e52abcd4 (patch) | |
tree | 1390155b56671c5096c7f0ca64aea6cde0f74654 /man | |
parent | 063bc36469fd89a6341526fd35530c3406a3ed0a (diff) |
man: mention UTC support for timestamps
Diffstat (limited to 'man')
-rw-r--r-- | man/systemd.time.xml | 42 |
1 files changed, 25 insertions, 17 deletions
diff --git a/man/systemd.time.xml b/man/systemd.time.xml index 64358351d5..f00be28b3a 100644 --- a/man/systemd.time.xml +++ b/man/systemd.time.xml @@ -117,10 +117,11 @@ <refsect1> <title>Parsing Timestamps</title> - <para>When parsing systemd will accept a similar timestamp syntax, - but excluding any timezone specification (this limitation might be - removed eventually). The weekday specification is optional, but - when the weekday is specified it must either be in the abbreviated + <para>When parsing systemd will accept a similar syntax, but expects + no timezone specification, unless it is given as the literal string + "UTC". In this case the time is considered in UTC time, otherwise in + the local timezone. The weekday specification is optional, but when + the weekday is specified it must either be in the abbreviated (<literal>Wed</literal>) or non-abbreviated (<literal>Wednesday</literal>) English language form (case does not matter), and is not subject to the locale choice of the user. @@ -157,22 +158,29 @@ 00:00.</para> <para>Examples for valid timestamps and their normalized form - (assuming the current time was 2012-11-23 18:15:22):</para> + (assuming the current time was 2012-11-23 18:15:22 and the timezone + was UTC+8, for example TZ=Asia/Shanghai):</para> <programlisting>Fri 2012-11-23 11:12:13 → Fri 2012-11-23 11:12:13 2012-11-23 11:12:13 → Fri 2012-11-23 11:12:13 - 2012-11-23 → Fri 2012-11-23 00:00:00 - 12-11-23 → Fri 2012-11-23 00:00:00 - 11:12:13 → Fri 2012-11-23 11:12:13 - 11:12 → Fri 2012-11-23 11:12:00 - now → Fri 2012-11-23 18:15:22 - today → Fri 2012-11-23 00:00:00 - yesterday → Fri 2012-11-22 00:00:00 - tomorrow → Fri 2012-11-24 00:00:00 - +3h30min → Fri 2012-11-23 21:45:22 - -5s → Fri 2012-11-23 18:15:17 - 11min ago → Fri 2012-11-23 18:04:22 - @1395716396 → Tue 2014-03-25 03:59:56</programlisting> +2012-11-23 11:12:13 UTC → Fri 2012-11-23 19:12:13 + 2012-11-23 → Fri 2012-11-23 00:00:00 + 12-11-23 → Fri 2012-11-23 00:00:00 + 11:12:13 → Fri 2012-11-23 11:12:13 + 11:12:13.9900009 → Fri 2012-11-23 11:12:13 + format_timestamp_us: Fri 2012-11-23 11:12:13.990000 + 11:12 → Fri 2012-11-23 11:12:00 + now → Fri 2012-11-23 18:15:22 + today → Fri 2012-11-23 00:00:00 + today UTC → Fri 2012-11-23 16:00:00 + yesterday → Fri 2012-11-22 00:00:00 + tomorrow → Fri 2012-11-24 00:00:00 + +3h30min → Fri 2012-11-23 21:45:22 + +3h30min UTC → -EINVAL + -5s → Fri 2012-11-23 18:15:17 + 11min ago → Fri 2012-11-23 18:04:22 + 11min ago UTC → -EINVAL + @1395716396 → Tue 2014-03-25 03:59:56</programlisting> <para>Note that timestamps printed by systemd will not be parsed correctly by systemd, as the timezone specification is not |