ptime.1 (1031B)
1 .Dd September 18, 2019 2 .Dt PTIME 1 3 .Os 4 .Sh NAME 5 .Nm ptime 6 .Nd reformat timestamps 7 .Sh SYNOPSIS 8 .Nm 9 .Ar format 10 .Ar timestamp 11 .Op Ar out-format 12 .Sh DESCRIPTION 13 The 14 .Nm 15 utility parses 16 .Ar timestamp 17 according to the format string 18 .Ar format , 19 reformats it as the number of seconds since the Epoch, UTC, 20 and writes it to the standard output. 21 If 22 .Ar out-format 23 is provided and is valid, 24 .Nm 25 will reformat 26 .Ar timestamp 27 according to 28 .Ar out-format . 29 The syntax used for 30 .Ar format 31 and 32 .Ar out-format 33 are described in 34 .Xr strptime 3 35 and 36 .Xr strftime 3 , 37 respectively. 38 .Sh EXIT STATUS 39 .Ex -std 40 .Sh EXAMPLES 41 Format the output of 42 .Xr date 1 43 as the number of seconds since the Epoch: 44 .Pp 45 .Dl $ ptime \&"%a %b %e %H:%M:%S %Z %Y\&" \&"$(date)\&" 46 .Pp 47 Format a UTC 48 .%R RFC-3339 49 timestamp into a locale readable rendition: 50 .Pp 51 .Dl $ ptime \&"%FT%TZ\&" \&"1985-04-12T23:20:50Z\&" \&"%B %d, %Y\&" 52 .Sh SEE ALSO 53 .Xr date 1 , 54 .Xr strftime 3 , 55 .Xr strptime 3 56 .Sh AUTHORS 57 The 58 .Nm 59 utility is maintained by 60 .An Stephen Gregoratto Aq Mt dev@sgregoratto.me .