From 1a18027fc7d6eb853b2bb33f9f65591536d7b341 Mon Sep 17 00:00:00 2001 From: Andreas Gruenbacher Date: Mon, 2 Nov 2009 20:22:23 +0100 Subject: Implement -r / --reference option in compat/date (patch from Olivier Mehani ) --- compat/date.in | 1 + 1 file changed, 1 insertion(+) (limited to 'compat/date.in') 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; -- cgit