[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
date problem
From: |
Heiko Schlichting |
Subject: |
date problem |
Date: |
Mon, 30 Mar 2009 11:29:58 +0200 |
User-agent: |
Mutt/1.5.16 (2007-06-09) |
Hi,
I read FAQ 24 ("The date command is not working right") but the following
problem is not what I expect on the day after daylight saving time starts.
All the outputs are done at epoch 1238364060, timezone Europe/Berlin using
coreutils 7.1. This is one minute after midnight on the day after day light
saving starts.
$ date -d now +"%Y%m%d"
20090330
$ date -d yesterday +"%Y%m%d"
20090328
Problem! I expect this to be 20090329.
More details:
$ date -d now
Mon Mar 30 00:01:00 CEST 2009
$ date -d yesterday
Sat Mar 28 23:01:00 CET 2009
Problem! This is 24 hours subtracted but not what is expected as "yesterday
at the same time of the day".
Effect: Logfile rotation failed or overwrite logfiles of the day before as
date -d yesterday +"%Y%m%d"
outputs the wrong (unexpected) date.
Heiko
Heiko Schlichting Freie Universität Berlin
address@hidden Zentraleinrichtung für Datenverarbeitung (ZEDAT)
Telefon +49 30 838-54327 Fabeckstraße 32
Telefax +49 30 838454327 14195 Berlin
- date problem,
Heiko Schlichting <=