diff options
author | Andreas Gruenbacher <agruen@murkel-lan.suse.de> | 2009-11-02 20:22:23 +0100 |
---|---|---|
committer | Andreas Gruenbacher <agruen@murkel-lan.suse.de> | 2009-11-02 20:22:23 +0100 |
commit | 1a18027fc7d6eb853b2bb33f9f65591536d7b341 (patch) | |
tree | a305c578d1b6cac22917e69df7f80ffdf965d033 /compat | |
parent | 6d2501ac40086134172a025544cb618be0b3b0ed (diff) | |
download | quilt-1a18027fc7d6eb853b2bb33f9f65591536d7b341.tar.gz |
Implement -r / --reference option in compat/date (patch from Olivier Mehani <shtrom-savanah@ssji.net>)
Diffstat (limited to 'compat')
-rw-r--r-- | compat/date.in | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/compat/date.in b/compat/date.in index c67fe80..36d46e5 100644 --- a/compat/date.in +++ b/compat/date.in @@ -44,6 +44,7 @@ sub parse_utc_secs($) { GetOptions('rfc-822|R' => sub() { $spec = '%a, %d %b %Y %H:%M:%S %z' }, 'utc|universal|u' => \$utc, 'date|d=s' => sub() { $now = parse_utc_secs($_[1]) }, + 'reference|r=s' => sub() { my @filestats = stat($_[1]); $now = parse_utc_secs('1970/01/01 UTC ' . $filestats[9] . ' seconds') }, 'help|h' => sub() { usage }) or usage; |