This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch] contrib/reg_*: Fix the uses of the date command.
- From: Janis Johnson <janis187 at us dot ibm dot com>
- To: Kazu Hirata <kazu at cs dot umass dot edu>
- Cc: gcc-patches at gcc dot gnu dot org, janis187 at us dot ibm dot com
- Date: Mon, 17 Jan 2005 17:31:13 -0800
- Subject: Re: [patch] contrib/reg_*: Fix the uses of the date command.
- References: <20050116.061815.83629853.kazu@cs.umass.edu>
On Sun, Jan 16, 2005 at 06:18:15AM -0500, Kazu Hirata wrote:
>
> Attached is a patch to fix the uses of the date command.
>
> Currently, reg_search (and presumably reg_periodic) converts the epoch
> into a human readable form using
>
> date --date "1970-01-01 00:00:1105874003"
>
> which prints out
>
> Thu Jan 1 00:00:59 EST 1970
This worked with older versions of date, including the one I'm still
using on all of my systems.
> The patch fixes the problem by using
>
> date --date "1970-01-01 UTC 1105874003 seconds"
>
> which prints out
>
> Sun Jan 16 06:13:23 EST 2005
>
> IMHO, we should put UTC there because these days both mailing lists
> and CVS at gcc.gnu.org use UTC.
The -u option passed to date (which reg_search already uses) says to
interpret the date as UTC, so adding the string is redundant.
> Tested on i686-pc-linux-gnu. OK to apply?
Without the new "UTC", yes. Thanks!
Janis