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: Bart Robinson
Subject: Re: Patch for timezone handling in cvs log
Date: Wed, 5 May 2004 15:39:52 -0700 (PDT)

On 2004-5-5 Derek Robert Price <address@hidden> wrote:
 > Bart Robinson wrote:
 > 
 > >On 2004-5-5 Derek Robert Price <address@hidden> 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.

-- bart




reply via email to

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