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

Re: Hey, what is this!?



Torsten Landschoff <t.landschoff@gmx.net> wrote:
> Hi Wichert, Vincent, 
> 
> I was just working on the util-linux package to get the rc bugs fixed. 
> I was also looking at some old bugs when I stumbled across this:
> 
> > Observe:
> >
> > bash-2.02# hwclock --utc --set --date='Sun May  2 16:20:49 CEST 1999'
> > bash-2.02# hwclock --utc --show
> > Sun May  2 17:20:54 1999  -0.915558 seconds
> >
> > Somehow that doesn't strike me as correct behaviour..
> >
> > Wichert.
> 
> Maybe even more interesting is this:
> 
> torsten@pulsar:~ $ date -d 'Sun May  2 16:20:49 CEST 1999'
> Sun May  2 17:20:49 CEST 1999
> torsten@pulsar:~ $ date -d 'Sun May  2 16:20:49 CET 1999'
> Sun May  2 17:20:49 CEST 1999

On my machine I get this:

$ date -d 'Sun May  2 16:20:49 CEST 1999'
Sun May  2 16:20:49 BST 1999
$ date -d 'Sun May  2 16:20:49 CET 1999'
Sun May  2 16:20:49 BST 1999

Let's try something different:

$ date -d 'Sun Jan  2 16:20:49 CEST 1999'
Sat Jan  2 15:20:49 GMT 1999
$ date -d 'Sun Jan  2 16:20:49 CET 1999'
Sat Jan  2 15:20:49 GMT 1999

Interesting.

> It seems that date ignores the daylight saving flag of the timezone. 
> I don't know why hwclock and date share the same behaviour but I don't 
> want to check now as I have to go to bed...
> 
> What do you think?

Time for bed.

-- 
I consume, therefore I am


Reply to: