bug#23270: Bug in 'date' command

2016-04-11 Thread Maarten
Hello,
 

I recently discovered a bug, or at least unexpected behavior, about the ‘date’ 
command which I want to report.  The bug is related to the moment of ‘daylight 
saving time’ (summertime / wintertime)

 

On Monday the 28st of march at 0.15 I run an automated script with the command:

# date -d yesterday +%d-%m-%Y

 

The return of that command was 26-03-2016 where I expected 27-03-2016. (2 days 
before, where I expected only 1 day before)

 

My only explanation is that the command is run the day after 27-3-2016, the day 
that the our region switched from summertime to wintertime.  At 2.00 the clock 
is forwarded to 3.00 so the day is only 23 hours long. When I request a 
‘yesterday at 28-03-20160.15 the request is about 24 hours before.  The answer 
is 26-03-2016 at 23.15.

 

Anyway, a ‘date -d yesterday’ should return 1 day before, not 2 days before.  
In my case, as a result of it, an automated shell script went wrong.

 

Please, can you fix this ‘daylight saving time’ related bug?

 

More info:

 

Timezone: Amsterdam, europe

 

# cat /etc/redhat-release

Red Hat Enterprise Linux Server release 6.7 (Santiago)

 

# date --version

date (GNU coreutils) 8.4

Copyright (C) 2010 Free Software Foundation, Inc.

License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>;.

This is free software: you are free to change and redistribute it.

There is NO WARRANTY, to the extent permitted by law.

 

Written by David MacKenzie.

 

Many thanks!  If you need further information, please let me know.

 

Best regards,

 

Maarten Mastbroek

 

join ?

2008-10-17 Thread Maarten . Vanneste
Hello,

I have the following question about the join command. I thought join would 
merge the columns of different files when the same index or value is 
present in the specified columns. Now I have the impression that it does 
not work fine when the two data files do not have the same number of 
values or range.

For example, I created the following files:
echo 84 150 | gawk '{for (i=$1;i=$2;i++) printf %i %s\n, i,A}'  
testA
echo 109 150 | gawk '{for (i=$1;i=$2;i++) printf %i %s\n, i,B}'  
testB
join -1 1 -2 1 testA testB  testAB
This file is empy, though I anticipated the rows from values 109 to 150 to 
be joined.

Using 84 (or 109) instead of 109 (or 84) gives the expected output. I 
thought the join command would read one file and scan the other to find 
the corresponding record, and as such only return those rows occurring in 
the two files.

I tried this on both cygwin (6.10) and linux operating system (6.9).

Looking forward to hearing from you,
Maarten


=
Dr. Maarten Vanneste
International Centre for Geohazards - Norwegian Geotechical Institute
Oslo, Norway
www.geohazards.no
www.ngi.no

_
Neither the confidentiality nor the integrity of this message can be 
guaranteed following transmission on the Internet.  The addressee should 
consider this risk and take full responsibility for use of this message. 
This e-mail has been swept by Norman antivirus software.
___
Bug-coreutils mailing list
Bug-coreutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-coreutils


Ad: Re: join ?

2008-10-17 Thread Maarten . Vanneste
Hmmm, Thanks for the very quick reply ! Indeed, I manage to get it working 
with sort (no specifications). I sorted it before as well, to no avail, 
but then I used sort -n or -g.

Have a nice weekend !
Maarten





Andreas Schwab [EMAIL PROTECTED] 
17/10/2008 13:13

Til
[EMAIL PROTECTED]
cc
bug-coreutils@gnu.org
Emne
Re: join ?






[EMAIL PROTECTED] writes:

 I have the following question about the join command. I thought join 
would 
 merge the columns of different files when the same index or value is 
 present in the specified columns.

The input must be sorted on the join filed.

 For example, I created the following files:
 echo 84 150 | gawk '{for (i=$1;i=$2;i++) printf %i %s\n, i,A}'  

$ echo 84 150 | gawk '{for (i=$1;i=$2;i++) printf %i %s\n, i,A}' | 
sort -c -k 1b,1
sort: -:17: disorder: 100 A

Andreas.

-- 
Andreas Schwab, SuSE Labs, [EMAIL PROTECTED]
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
PGP key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
And now for something completely different.





_
Neither the confidentiality nor the integrity of this message can be 
guaranteed following transmission on the Internet.  The addressee should 
consider this risk and take full responsibility for use of this message. 
This e-mail has been swept by Norman antivirus software.
___
Bug-coreutils mailing list
Bug-coreutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-coreutils


Ad: Re: join

2007-03-14 Thread Maarten . Vanneste
Thank you very much again for your quick replies on this matter. I had
thought that it would work on numerically ordered files, which may thus not
necessarily be the case, and indeed, there was a change from something 9000
to over 12000 more or less where the program failed...
In the meanwhile I am upgrading the cygwin installation here.

Kind regards,
Maarten

=
Dr. Maarten Vanneste
International Centre for Geohazards - Norwegian Geotechical Institute
Oslo, Norway
www.geohazards.no
www.ngi.no


   
 Paul Eggert   
 [EMAIL PROTECTED] 
 DU   Til 
   [EMAIL PROTECTED] 
 13/03/2007 23:06   cc 
   bug-coreutils@gnu.org   
  Emne 
   Re: join
   
   
   
   
   
   




[EMAIL PROTECTED] writes:

 This suggests that
 the join command has a maximum number of lines it can read, is this
correct?

It depends on your machine and OS.  For example, if you have many
lines with the same key 'join' has to keep them all in memory, and if
they don't fit in memory it will fail.  It has to count the lines,
too, and the counter is of limited size.

 From my test, it turns out to be somewhere around 6600 lines after which
 the program terminates.

Most likely the problem is somewhere else, then.  On 32-bit machines
the limit is around 4 billion bytes' worth of lines (or less if your
computer has less memory).

I'd guess your input files were not sorted.





_
Neither the confidentiality nor the integrity of this message can be
guaranteed following transmission on the Internet.  The addressee should
consider this risk and take full responsibility for use of this message.
This e-mail has been swept by Norman antivirus software.



___
Bug-coreutils mailing list
Bug-coreutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-coreutils


join

2007-03-13 Thread Maarten . Vanneste

Hello,

I have tried to use the join program to merge two large files (containing
thousands of separate lines both, and each file has at least 10 columns of
data). It appears that the join command, using the first column in each
file as the join field always stopped at about the same level. I have tried
a number of things to circumvent this issue, but to no avail. The final
solution was to split up my two input files and join the smaller files, and
afterwards using cat to put them back into one big file. This suggests that
the join command has a maximum number of lines it can read, is this correct
? From my test, it turns out to be somewhere around 6600 lines after which
the program terminates.

With kind regards,
Maarten


=
Dr. Maarten Vanneste
International Centre for Geohazards - Norwegian Geotechical Institute
Oslo, Norway
www.geohazards.no
www.ngi.no

_
Neither the confidentiality nor the integrity of this message can be
guaranteed following transmission on the Internet.  The addressee should
consider this risk and take full responsibility for use of this message.
This e-mail has been swept by Norman antivirus software.



___
Bug-coreutils mailing list
Bug-coreutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-coreutils