diff options
Diffstat (limited to 'upstream/opensuse-tumbleweed/man7/systemd.time.7')
-rw-r--r-- | upstream/opensuse-tumbleweed/man7/systemd.time.7 | 55 |
1 files changed, 45 insertions, 10 deletions
diff --git a/upstream/opensuse-tumbleweed/man7/systemd.time.7 b/upstream/opensuse-tumbleweed/man7/systemd.time.7 index 6a7a1996..39e552a7 100644 --- a/upstream/opensuse-tumbleweed/man7/systemd.time.7 +++ b/upstream/opensuse-tumbleweed/man7/systemd.time.7 @@ -1,5 +1,5 @@ '\" t -.TH "SYSTEMD\&.TIME" "7" "" "systemd 254" "systemd.time" +.TH "SYSTEMD\&.TIME" "7" "" "systemd 255" "systemd.time" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -201,16 +201,43 @@ timezone specifier in the output\&. In some cases timestamps are shown with microsecond granularity\&. In this case the sub\-second remainder is separated by a full stop from the seconds component\&. .SH "PARSING TIMESTAMPS" .PP -When parsing, systemd will accept a similar syntax, but expects no timezone specification, unless it is given as the literal string -"UTC" -(for the UTC timezone), or is specified to be the locally configured timezone, or the timezone name in the IANA timezone database format\&. The complete list of timezones supported on your system can be obtained using the +When parsing, systemd will accept a similar syntax, but some fields can be omitted, and the space between the date and time can be replaced with a +"T" +(à la the +\m[blue]\fBRFC 3339\fR\m[]\&\s-2\u[1]\d\s+2 +profile of ISO 8601); thus, in CET, the following are all identical: +"Fri 2012\-11\-23 23:02:15 CET", +"Fri 2012\-11\-23T23:02:15", +"2012\-11\-23T23:02:15 CET", +"2012\-11\-23 23:02:15"\&. +.PP +The timezone defaults to the current timezone if not specified explicitly\&. It may be given after a space, like above, in which case it can be: +"UTC", an entry in the installed IANA timezone database ("CET", +"Asia/Tokyo", &c\&.; complete list obtainable with "timedatectl list\-timezones" (see -\fBtimedatectl\fR(1))\&. Using IANA format is recommended over local timezone names, as less prone to errors (e\&.g\&. with local timezone it\*(Aqs possible to specify daylight saving time in winter, even though that is not correct)\&. The weekday specification is optional, but when the weekday is specified, it must either be in the abbreviated ("Wed") or non\-abbreviated ("Wednesday") English language form (case does not matter), and is not subject to the locale choice of the user\&. Either the date, or the time part may be omitted, in which case the current date or 00:00:00, respectively, is assumed\&. The seconds component of the time may also be omitted, in which case ":00" is assumed\&. Year numbers may be specified in full or may be abbreviated (omitting the century)\&. +\fBtimedatectl\fR(1))), or +"\(+-\fI05\fR", +"\(+-\fI05\fR\fI30\fR", +"\(+-\fI05\fR:\fI30\fR", +"Z"\&. +.PP +It may also be affixed directly to the timestamp, in which case it must correspond to one of the formats defined in the +\m[blue]\fBRFC 3339\fR\m[]\&\s-2\u[1]\d\s+2 +profile of ISO 8601: +"\(+-\fI05\fR:\fI30\fR" +or +"Z"\&. Thus, the following are also identical to the above: +"2012\-11\-23T23:02:15+01:00", +"2012\-11\-23 22:02:15Z"\&. +.PP +A timestamp can start with a field containing a weekday, which can be in an abbreviated ("Wed") or non\-abbreviated ("Wednesday") English language form (case does not matter), regardless of the locale\&. However, if a weekday +\fIis\fR +specified and doesn\*(Aqt match the date, the timestamp is rejected\&. .PP -A timestamp is considered invalid if a weekday is specified and the date does not match the specified day of the week\&. +If the date is omitted, it defaults to today\&. If the time is omitted, it defaults to 00:00:00\&. Fractional seconds can be specified down to 1\(mcs precision\&. The seconds field can also be omitted, defaulting to 0\&. .PP -When parsing, systemd will also accept a few special placeholders instead of timestamps: +There are special tokens that can be used in place of timestamps: "now" may be used to refer to the current time (or of the invocation of the command that is currently executed)\&. "today", @@ -218,7 +245,7 @@ may be used to refer to the current time (or of the invocation of the command th "tomorrow" refer to 00:00:00 of the current day, the day before, or the next day, respectively\&. .PP -When parsing, systemd will also accept relative time specifications\&. A time span (see above) that is prefixed with +Relative times are also accepted: a time span (see above) prefixed with "+" is evaluated to the current time plus the specified time span\&. Correspondingly, a time span that is prefixed with "\-" @@ -230,9 +257,9 @@ or or "ago"\&. .PP -Finally, a timespan prefixed with +Finally, an integer prefixed with "@" -is evaluated relative to the UNIX time epoch 1st Jan, 1970, 00:00\&. +is evaluated relative to the UNIX epoch \(en 1970\-01\-01 00:00:00 UTC\&. .PP Examples for valid timestamps and their normalized form (assuming the current time was 2012\-11\-23 18:15:22 and the timezone was UTC+8, for example "TZ=:Asia/Shanghai"): @@ -244,6 +271,8 @@ Examples for valid timestamps and their normalized form (assuming the current ti 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 11:12:13 UTC → Fri 2012\-11\-23 19:12:13 + 2012\-11\-23T11:12:13Z → Fri 2012\-11\-23 19:12:13 + 2012\-11\-23T11:12+02:00 → Fri 2012\-11\-23 17:12:00 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 @@ -429,3 +458,9 @@ to validate and normalize calendar time specifications for testing purposes\&. T \fBsystemd.unit\fR(5), \fBsystemd.directives\fR(7), \fBsystemd-analyze\fR(1) +.SH "NOTES" +.IP " 1." 4 +RFC 3339 +.RS 4 +\%https://tools.ietf.org/html/rfc3339 +.RE |