This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch] contrib/reg_*: Fix the uses of the date command.


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]