1DATEZONE(1)                      User Commands                     DATEZONE(1)
2
3
4

NAME

6       datezone - Convert DATE/TIMEs between timezones.
7

SYNOPSIS

9       datezone [OPTION]...  [ZONENAME]... [DATE/TIME]...
10

DESCRIPTION

12       Convert  DATE/TIMEs between timezones.  If DATE/TIME is omitted, it de‐
13       faults to `now'.
14
15       DATE/TIME can also be one of the following specials
16         - `now'           interpreted as the current (UTC) time stamp
17         - `time'          the time part of the current (UTC) time stamp
18         - `today'         the current date (according to UTC)
19         - `tomo[rrow]'    tomorrow's date (according to UTC)
20         - `y[ester]day'   yesterday's date (according to UTC)
21
22       When DATE/TIME is a date (i.e. the time component is omitted)  the  re‐
23       sult will show the timezone offset at the end of that day.
24
25       When  DATE/TIME is a time (i.e. the date component is omitted) the con‐
26       version takes place on the date as specified by --base|-b,  by  default
27       the current date.
28
29
30       Recognized OPTIONs:
31
32       -h, --help
33              display this help and exit
34
35       -V, --version
36              output version information and exit
37
38       -q, --quiet
39              Suppress  message  about date/time or zonename parser errors and
40              fix-ups.  The default is to print a  warning  or  the  fixed  up
41              value and return error code 2.
42
43       -b, --base=DT
44              For underspecified input use DT as a fallback to fill in missing
45              fields.  Also used for ambiguous format specifiers  to  position
46              their  range  on the absolute time line.  Must be a date/time in
47              ISO8601 format.  If omitted defaults to the current date/time.
48
49       -i, --input-format=STRING...
50              Input format, can be used multiple times.  Each  date/time  will
51              be  passed  to  the  input  format parsers in the order they are
52              given, if a date/time can be read successfully with a given  in‐
53              put format specifier string, that value will be used.
54
55       --from-locale=LOCALE
56              Interpret  dates on stdin or the command line as coming from the
57              locale LOCALE, this would only affect month and weekday names as
58              input formats have to be specified explicitly.
59
60       --from-zone=ZONE
61              Interpret  dates on stdin or the command line as coming from the
62              time zone ZONE.
63
64       --next Show next transition from/to DST.
65
66       --prev Show previous transition from/to DST.
67

FORMAT SPECS

69       Format specs in dateutils are similar to posix' strftime().
70
71       However, due to a broader range of supported calendars  dateutils  must
72       employ different rules.
73
74       Date specs:
75         %a  The abbreviated weekday name
76         %A  The full weekday name
77         %_a The weekday name shortened to a single character (MTWRFAS)
78         %b  The abbreviated month name
79         %B  The full month name
80         %_b The month name shortened to a single character (FGHJKMNQUVXZ)
81         %c  The count of the weekday within the month (range 00 to 05)
82         %C  The count of the weekday within the year (range 00 to 53)
83         %d  The day of the month, 2 digits (range 00 to 31)
84         %D  The day of the year, 3 digits (range 000 to 366)
85         %F  Equivalent to %Y-%m-%d (ymd's canonical format)
86         %g  ISO week date year without the century (range 00 to 99)
87         %G  ISO week date year including the century
88         %j  Equivalent to %D
89         %m  The month in the current calendar (range 00 to 12)
90         %Q  The quarter of the year (range Q1 to Q4)
91         %q  The number of the quarter (range 01 to 04)
92         %s  The number of seconds since the Epoch.
93         %u  The weekday as number (range 01 to 07, Sunday being 07)
94         %U  The week count,  day of week is Sun (range 00 to 53)
95         %V  The ISO week count,  day of week is Mon (range 01 to 53)
96         %w  The weekday as number (range 00 to 06, Sunday being 00)
97         %W  The week count,  day of week is Mon (range 00 to 53)
98         %y  The year without a century (range 00 to 99)
99         %Y  The year including the century
100         %_y The year shortened to a single digit
101         %Z  The zone offset in hours and minutes (HH:MM) with
102             a preceding sign (+ for offsets east of UTC, - for offsets
103             west of UTC)
104
105         %Od The day as roman numerals
106         %Om The month as roman numerals
107         %Oy The two digit year as roman numerals
108         %OY The year including the century as roman numerals
109
110         %rs In time systems whose Epoch is different from the unix Epoch, this
111             selects the number of seconds since then.
112         %rY In calendars with years that don't coincide with the Gregorian
113             years, this selects the calendar's year.
114
115         %dth  The day of the month as an ordinal number, 1st, 2nd, 3rd, etc.
116         %mth  The month of the year as an ordinal number, 1st, 2nd, 3rd, etc.
117
118         %db The business day of the month (since last month's ultimo)
119         %dB Number of business days until this month's ultimo
120
121       Time specs:
122         %H  The hour of the day using a 24h clock, 2 digits (range 00 to 23)
123         %I  The hour of the day using a 12h clock, 2 digits (range 01 to 12)
124         %M  The minute (range 00 to 59)
125         %N  The nanoseconds (range 000000000 to 999999999)
126         %p  The string AM or PM, noon is PM and midnight is AM.
127         %P  Like %p but in lowercase
128         %S  The  (range 00 to 60, 60 is for leap seconds)
129         %T  Equivalent to %H:%M:%S
130
131       General specs:
132         %n  A newline character
133         %t  A tab character
134         %%  A literal % character
135
136       Modifiers:
137         %O  Modifier to turn decimal numbers into Roman numerals
138         %r  Modifier to turn units into real units
139         %0  Modifier to turn on zero prefixes
140         %SPC  Modifier to turn on space prefixes
141         %-  Modifier to turn off prefixes altogether
142         th  Suffix, read and print ordinal numbers
143         b   Suffix, treat days as business days
144
145       By design dates before 1601-01-01 are not supported.
146
147       For  conformity here is a list of calendar designators and their corre‐
148       sponding format string:
149         ymd     %Y-%m-%d
150         ymcw    %Y-%m-%c-%w
151         ywd     %rY-W%V-%u
152         bizda   %Y-%m-%db
153         lilian     n/a
154         ldn        n/a
155         julian     n/a
156         jdn        n/a
157         matlab     n/a
158         mdn        n/a
159
160       These designators can  be  used  as  output  format  string,  moreover,
161       @code{lilian}/@code{ldn}  and @code{julian}/@code{jdn} can also be used
162       as input format string.
163
164

EXAMPLES

166         $ datezone 2012-03-04T12:04:11
167         2012-03-04T12:04:11+00:00
168         $
169
170         $ datezone Europe/Berlin 2012-03-04T12:04:11
171         2012-03-04T13:04:11+01:00   Europe/Berlin
172         $
173
174         $ datezone 2012-03-04T12:04:11 UTC
175         2012-03-04T12:04:11+00:00   UTC
176         $
177
178         $ datezone Europe/Berlin Australia/Sydney 2012-01-01T14:04:00 2012-05-14T12:04:00
179         2012-01-01T15:04:00+01:00   Europe/Berlin
180         2012-01-02T01:04:00+11:00   Australia/Sydney
181         2012-05-14T14:04:00+02:00   Europe/Berlin
182         2012-05-14T22:04:00+10:00   Australia/Sydney
183         $
184

AUTHOR

186       Written by Sebastian Freundt <freundt@fresse.org>
187

REPORTING BUGS

189       Report bugs to: https://github.com/hroptatyr/dateutils/issues
190

SEE ALSO

192       The full documentation for datezone is maintained as a Texinfo  manual.
193       If  the info and datezone programs are properly installed at your site,
194       the command
195
196              info (dateutils)datezone
197
198       should give you access to the complete manual.
199
200
201
202dateutils 0.4.10                   May 2022                        DATEZONE(1)
Impressum