1TS(1) TS(1)
2
3
4
6 ts - timestamp input
7
9 ts [-r] [format]
10
12 ts adds a timestamp to the beginning of each line of input.
13
14 The optional format parameter controls how the timestamp is formatted,
15 as used by strftime(3). The default format is "%b %d %H:%M:%S". In
16 addition to the regular strftime conversion specifications, "%.S" is
17 expanded to fractional seconds (ie, "30.00001").
18
19 If the -r switch is passed, it instead converts existing timestamps in
20 the input to relative times, such as "15m5s ago". Many common timestamp
21 formats are supported. Note that the Time::Duration and Date::Parse
22 perl modules are required for this mode to work. Currently,A converting
23 localized dates is not supported.
24
25 If both -r and a format is passed, the existing timestamps are
26 converted to the specified format.
27
29 The standard TZ environment variable controls what time zone dates are
30 assumed to be in, if a timezone is not specified as part of the date.
31
33 Copyright 2006 by Joey Hess <joey@kitenet.net>
34
35 Licensed under the GNU GPL.
36
37
38
39moreutils 2010-04-28 TS(1)