Hello Bob,

        Many thanks for such a quick response!

        -]      your suggestion of passing a time away from midnight
                did work, many thanks.

Other comments below within your text...

Le Fri, 6 May 2011 14:36:03 -0600,
Bob Proulx <b...@proulx.com> a écrit :

> severity 625909 normal
> tags 625909 + unreproducible
> thanks
> 
> Thanks for your report.  However I have set the bug severity to normal
> since this type of bug is often reported but is almost always due to
> timezone issues surrounding local Daylight Saving Time and not to an
> actual bug in date.

        Understood.

        I initially set the severity to 'important' because it crashed my main
        application - initially developed while I was using Suse, 12 years ago,
        running in debian since about 7 years. All of a sudden if I may say so,
        started to crash. It uses the system date 'tool' to get back week and 
day
        numbers... By chance, but then the 'big numbers probability law' caught 
me,
        this application never faced such a TZ DST 'problem' [in the mean time I
        lived in Cambridge [UK], LA, Miami and now in Rio :-)]

IMHO though, when using date passing a date 'per se' and no time, it should 
default
the time to an existing time value in the TZ, DST taken into account and
independently of the date itself - possible? - which might be erroneous [I
use 'date' to check the validity of 'user dates' for example], don't you think 
so?

> David Pirotte wrote:
> > david@rascar:~ 19 $ date --date="2010-10-17" +'%c'
> > date: invalid date 2010-10-17'
> 
> I cannot reproduce this result.
> 
>   $ TZ=US/Mountain date --date="2010-10-17" +'%c'
>   Sun 17 Oct 2010 12:00:00 AM MDT

You will if you temporarily set yourself in the BRST TZ [see the ltrace output I
sent]

> Here is a useful reference to the interaction of date and timezones...

Many thanks, very useful to know indeed.

> Try using a time away from midnight and toward noon which is usually
> far away from DST changes.
> 
>   $ TZ=US/Mountain date --date="2010-10-17 12:00" +'%c'
>   Sun 17 Oct 2010 12:00:00 PM MDT

This work here too, many thanks:

        david@rascar:~ 1 $ date --date="2010-10-17 12:00" +'%c'
        Sun 17 Oct 2010 12:00:00 PM BRST

> Personally I prefer use of -R to produce an unambiguous standard time
> string output format...

Yes, actually I sent the '+%c' example, because I tried with some guile
developers on irc to check few things before to send the message ... but I do 
use
this code to get the week number, day number ... 

David



--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to