Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ (1) — Plan9 4th Edition

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

date(1)

du(1)

mtime(1)

ctime(2)

SECONDS(1)

NAME

seconds − convert human-readable date (and time) to seconds since epoch

SYNOPSIS

­seconds ­date ... 

DESCRIPTION

­Seconds prints the number of seconds since 1 Jan 1970 corresponding to one or more human-readable dates. Each ­date must be ­one argument; it will usually be necessary to enclose it in quotes. 

­Seconds accepts a somewhat wider range of input than just output from date(1). The main requirement is that the date must be fully specified, with a day of month, month and year in any order. The month must be an English name (or abbreviation), not a number, and the year must contain 4 digits. Unambiguous time-zone names are understood (i.e., not IST) or time zones may be written as ±hhmm. Case is ignored.

EXAMPLES

Print the names of all files under ­.  modified since the start of 23 May 2011. 

du -ta | awk ’$1 >= ’^‘{seconds ’23 may 2011’}^’ {print $2}’

SEE ALSO

date(1), du(1), mtime(1), ctime(2)

BUGS

All-numeric dates, popular in the USA, are simply ambiguous, more so if the year is truncated to 2 digits. 

Plan 9  —  May 24, 2011

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026