1CONVDATE(1) InterNetNews Documentation CONVDATE(1)
2
3
4
6 convdate - Convert to/from RFC 5322 dates and seconds since epoch
7
9 convdate [-dhl] [-c | -n | -s] [date ...]
10
12 convdate translates the date/time strings given on the command line,
13 outputting the results one to a line. The input can either be a date
14 in RFC 5322 format (accepting the variations on that format that
15 innd(8) is willing to accept), or the number of seconds since epoch (if
16 -c is given). The output is either ctime(3) results, the number of
17 seconds since epoch, or a Usenet Date: header, depending on the options
18 given.
19
20 If date is not given, convdate outputs the current date.
21
23 -c Each argument is taken to be the number of seconds since epoch (a
24 time_t) rather than a date.
25
26 -d Output a valid Usenet Date: header instead of the results of
27 ctime(3) for each date given on the command line. This is useful
28 for testing the algorithm used to generate Date: headers for local
29 posts. Normally, the date will be in UTC, but see the -l option.
30
31 -h Print usage information and exit.
32
33 -l Only makes sense in combination with -d. If given, Date: headers
34 generated will use the local time zone instead of UTC.
35
36 -n Rather than outputting the results of ctime(3) or a Date: header,
37 output each date given as the number of seconds since epoch (a
38 time_t). This option doesn't make sense in combination with -d.
39
40 -s Pass each given date to the RFC 5322 date parser and print the
41 results of ctime(3) (or a Date: header if -d is given). This is
42 the default behavior.
43
45 Most of these examples are taken, with modifications from the original
46 man page dating from 1991 and were run in the EST/EDT time zone.
47
48 % convdate '10 Feb 1991 10:00:00 -0500'
49 Sun Feb 10 10:00:00 1991
50
51 % convdate '13 Dec 91 12:00 EST' '04 May 1990 0:0:0'
52 Fri Dec 13 12:00:00 1991
53 Fri May 4 00:00:00 1990
54
55 % convdate -n '10 feb 1991 10:00' '4 May 90 12:00'
56 666198000
57 641880000
58
59 % convdate -c 666198000
60 Sun Feb 10 10:00:00 1991
61
62 ctime(3) results are in the local time zone. Compare to:
63
64 % convdate -dc 666198000
65 Sun, 10 Feb 1991 15:00:00 -0000 (UTC)
66
67 % env TZ=PST8PDT convdate -dlc 666198000
68 Sun, 10 Feb 1991 07:00:00 -0800 (PST)
69
70 % env TZ=EST5EDT convdate -dlc 666198000
71 Sun, 10 Feb 1991 10:00:00 -0500 (EST)
72
73 The system library functions generally use the environment variable TZ
74 to determine (or at least override) the local time zone.
75
77 Written by Rich $alz <rsalz@uunet.uu.net>, rewritten and updated by
78 Russ Allbery <eagle@eyrie.org> for the -d and -l flags.
79
80 $Id: convdate.pod 9971 2015-12-10 20:30:10Z iulius $
81
83 active.times(5).
84
85
86
87INN 2.6.4 2016-10-07 CONVDATE(1)