bug-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Patch for timezone handling in cvs log


From: Derek Robert Price
Subject: Re: Patch for timezone handling in cvs log
Date: Thu, 06 May 2004 00:06:58 -0400
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040413

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Bart Robinson wrote:

>On 2004-5-5 Derek Robert Price <derek@ximbiot.com> wrote:
> > Bart Robinson wrote:
> >
> > >On 2004-5-5 Derek Robert Price <derek@ximbiot.com> wrote:
> > >
> > > > I noticed in your comment that you say you copied tm_diff()
directly
> > > > from the glibc strftime.c.  Why did you decide against
actually using
> > > > strftime()?
> > > >
> > > > Derek
> > >
> > >I didn't consider using strftime.  The comment above that
> > >routine is verbatim from ../lib/getdate.y.  I wanted to use the
> > >one from getdate but it is static.
> > >
> > >Looking at strftime, it doesn't look like it would have been
> > >useful for what I was trying to do (diff two struct tm's).
> >
> >
> > No, but the POSIX 2004 strftime() would have rendered the diff moot
> > since it has a "%z" format string that it will replace with the offset
> > from GMT in -HHMM format.  I'm not sure if that was introduced in an
> > earlier POSIX version or not, but if it wasn't or if some platforms
> > have a broken strftime(), we should be able to rely on the GNULIB
> > strftime module.
>
>Yeah, I unfortunately noticed %z after I sent my mail...  That
>would certainly be cleaner.
>
>Do you want me to take strftime stuff from GNULIB?  I'm not too
>familiar with what is involved there, dependencies, etc.  If
>that part is easy for you, I can resend my diffs with #ifdef
>HAVE_STRFTIME_Z or something you can remove once the GNULIB
>strftime is available.


Basically, importing the GNULIB strftime will mean we can assume it
without #ifdefing HAVE_STRFTIME or even HAVE_STRFTIME_Z.  If your
wouldn't mind regenerating the patch just using strftime, that would
be great!  I can do the GNULIB import quickly myself later if it
appears necessary.

Derek

- --
                *8^)

Email: derek@ximbiot.com

Get CVS support at <http://ximbiot.com>!
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFAmbnhLD1OTBfyMaQRAh3UAKCmQA/tOLmsTCS9FV55yxriO2l7pQCgwkHB
xsWuzyc7fDeKI+WYcaL4b0s=
=1BwE
-----END PGP SIGNATURE-----





reply via email to

[Prev in Thread] Current Thread [Next in Thread]