GNU bug report logs - #41107
date --date '20180325 02:58:00' fails

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: coreutils; Reported by: Julien Demaria <julien.demaria@HIDDEN>; Keywords: notabug; Done: Collin Funk <collin.funk1@HIDDEN>; Maintainer for coreutils is bug-coreutils@HIDDEN.
bug closed, send any further explanations to 41107 <at> debbugs.gnu.org and Julien Demaria <julien.demaria@HIDDEN> Request was from Collin Funk <collin.funk1@HIDDEN> to control <at> debbugs.gnu.org. Full text available.
Added tag(s) notabug. Request was from Collin Funk <collin.funk1@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

Message received at 41107 <at> debbugs.gnu.org:


Received: (at 41107) by debbugs.gnu.org; 10 Nov 2025 22:35:18 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Nov 10 17:35:18 2025
Received: from localhost ([127.0.0.1]:40582 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1vIaTm-0002Sv-2K
	for submit <at> debbugs.gnu.org; Mon, 10 Nov 2025 17:35:18 -0500
Received: from mail-pg1-x52d.google.com ([2607:f8b0:4864:20::52d]:49607)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.84_2) (envelope-from <collin.funk1@HIDDEN>)
 id 1vIaTk-0002NK-9K
 for 41107 <at> debbugs.gnu.org; Mon, 10 Nov 2025 17:35:16 -0500
Received: by mail-pg1-x52d.google.com with SMTP id
 41be03b00d2f7-bbac8ed0614so522464a12.3
 for <41107 <at> debbugs.gnu.org>; Mon, 10 Nov 2025 14:35:16 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1762814110; x=1763418910; darn=debbugs.gnu.org;
 h=content-transfer-encoding:mime-version:user-agent:message-id:date
 :subject:to:from:from:to:cc:subject:date:message-id:reply-to;
 bh=f0Rgdvw61BA66J7q5Ro2waoT0mtIGMbk5kvX2/U6w4U=;
 b=jmXJZGtrnxvnKNanCPqalX3zN1OsFL3qwqLmv2Cmmvkff7cDX5gOEGIRJ2nfuslk4Y
 6J1KR3pzz0QQ8wGNjuq1CrqXodr+DIfU+q5IvA2X/UVy60F1X2hqg8pG/QAlejz4x8ya
 Q16slPB+HTY2bOeRlsujLUF/SZxOhihe2hA/v8diZu5W+HFKhhEuiF48qLUTZFCshjWS
 dy7axhFnMRU+vN67ersa2RPa72NRqRe8edrFHf9EIrkETtXv4zRoDfertJGnL3tsAXlC
 YszH+ZHvdCcN613i1XL16syVUMOj3qkv+fhC88vc+ueaU47w9X5N54kXwXEaZrIKSQ59
 DCEw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1762814110; x=1763418910;
 h=content-transfer-encoding:mime-version:user-agent:message-id:date
 :subject:to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date
 :message-id:reply-to;
 bh=f0Rgdvw61BA66J7q5Ro2waoT0mtIGMbk5kvX2/U6w4U=;
 b=qisROD8fCJ0iEK/jJ5OOqbOKVjRMM8XSfBgp9y6BPiemfErzFRBKO943FrncxCAmOd
 h/FAVmlaULgYuIvjBrzvdDUl21zgUnnmc05k1vuJ0rfFgUeGvkavMa7riIQtL5UJkbG0
 XaEiKkuCmlZmG6rwIC15TMXMcvqIwEGn9Hqfo3AWPxPe+9V3d46yNEpG+p0QENxzSB/i
 Q1x+Dw9DiqrfwQW4RBeicN2zlJoY+QOSvmbXn9Zex1sdBlesk4G0Q0TC2fRaX5Xo42hr
 kWeqeSVwK5ZabOIZEPLN5xswd5xiioYPuRZOJsotwizGZtFWArBALE+YFaRJ7qYh3nR6
 mzGg==
X-Gm-Message-State: AOJu0YwnF/Z4fADVSnalxYDAgIJjTXGKVPpHCst50y8S0KrBCyOd33hE
 z8gjlxBKWpn+v/GRg6/pQs48qz0168LprLU5A+M2aoJ5hFodl+If9Z7VrJGLiQ==
X-Gm-Gg: ASbGncutgFFZjpUV3FmxHId8v5T96n/CzioZoe6Dfq9Ypa5jYGyRlemTzJMlB5Xqx7p
 IgPNLq3ZGK5BRBMzku2k6gpAxnrUCLbDWT09lB3uLh51+w+a4EzIbeOrvIyzsC50Q4EXc/XQ2tc
 7d2RlD6OOlp5Km/8QqatjBV+xisW8vK+4aBVNIV7lcsePfc5+8JoI6sVWFz2Vtk07LLDU2QeWpY
 Opk18Ht9P2PJMFCWpc+5XCYxoI4BD74W4S6MHkqFMFrhbEPSMLw3OyKXab/ccs6TkTdO0ALM/Io
 /WL63CxTw9N2MFXSAj/Pi8GG9if/A8ki0Wd4QaBs6WiPvlDDz+0ygOJjZPyi02qEgLzQneJqH7G
 bG1sFNuTOjups4DxBqnAtTvryGt8yTxacqkJkZ76+Dbj8POW8Sgpfm1Z0fLoqx+A2WkDw
X-Google-Smtp-Source: AGHT+IGVPPLgr0H/5KgT3lldwNaFXQq02W5TZgN76nNPzh1wVs59nsFb0IuhZUD0EcfZkwhQUbCBeA==
X-Received: by 2002:a17:903:244a:b0:290:cd9c:1229 with SMTP id
 d9443c01a7336-297e56223c7mr115897965ad.19.1762814109783; 
 Mon, 10 Nov 2025 14:35:09 -0800 (PST)
Received: from fedora ([2601:646:8081:3770::43bc])
 by smtp.gmail.com with ESMTPSA id
 d9443c01a7336-29651c701e9sm157340285ad.52.2025.11.10.14.35.09
 for <41107 <at> debbugs.gnu.org>
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Mon, 10 Nov 2025 14:35:09 -0800 (PST)
From: Collin Funk <collin.funk1@HIDDEN>
To: 41107 <at> debbugs.gnu.org
Subject: Re: bug#41107: date --date '20180325 02:58:00' fails
Date: Mon, 10 Nov 2025 14:35:08 -0800
Message-ID: <87ldkdfrdv.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: 0.3 (/)
X-Debbugs-Envelope-To: 41107
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.7 (/)

Hi Julien,

You wrote:

> We found this very suspect behavior:
>=20
> $ date --date '20180325 02:58:00'
> date: invalid date `20180325 02:58:00'
>=20
> but for the previous day it works...:
>=20
> $ date --date '20180323 02:58:00'
> Fri Mar 23 02:58:00 CET 2018
>=20
> Is it a bug?
>=20
> Adding -u or setting TZ seems a workaround.
>=20
> Tested with version 8.28 on Ubuntu 18.04.4 LTS
> and also with version 8.13 on Debian GNU/Linux 7

This report was from 5 years ago, so I assume you found the answer. If
not, then apologies for the late response.

The output of this command explains the behavior that you see:

    $ zdump -v Europe/Paris | grep 2018 | head -n 2
    Europe/Paris  Sun Mar 25 00:59:59 2018 UT =3D Sun Mar 25 01:59:59 2018 =
CET isdst=3D0 gmtoff=3D3600
    Europe/Paris  Sun Mar 25 01:00:00 2018 UT =3D Sun Mar 25 03:00:00 2018 =
CEST isdst=3D1 gmtoff=3D7200
=20=20=20=20
So we can see that one second after 01:59:59 on March 25th the time
changes to 03:00:00 instead of 02:00:00 because of daylight savings
time.

The --debug option attempts to make this case a bit more clear, so you
do not need to reference the output of 'zdump':

    $ TZ=3DEurope/Paris date --debug --date '20180325 02:58:00'
    date: parsed number part: (Y-M-D) 2018-03-25
    date: parsed time part: 02:58:00
    date: input timezone: TZ=3D"Europe/Paris" environment value
    date: using specified time as starting value: '02:58:00'
    date: error: invalid date/time value:
    date:     user provided time: '(Y-M-D) 2018-03-25 02:58:00'
    date:        normalized time: '(Y-M-D) 2018-03-25 03:58:00'
    date:                                             --
    date:      possible reasons:
    date:        nonexistent due to daylight-saving time;
    date:        invalid day/month combination;
    date:        missing timezone
    date: invalid date =E2=80=9820180325 02:58:00=E2=80=99

Thanks,
Collin




Information forwarded to bug-coreutils@HIDDEN:
bug#41107; Package coreutils. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 6 May 2020 08:46:31 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed May 06 04:46:31 2020
Received: from localhost ([127.0.0.1]:38478 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jWFhH-0005CQ-6W
	for submit <at> debbugs.gnu.org; Wed, 06 May 2020 04:46:31 -0400
Received: from lists.gnu.org ([209.51.188.17]:51218)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <julien.demaria@HIDDEN>) id 1jWF2t-0002uE-4g
 for submit <at> debbugs.gnu.org; Wed, 06 May 2020 04:04:47 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:34582)
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <julien.demaria@HIDDEN>)
 id 1jWF2t-00025I-04
 for bug-coreutils@HIDDEN; Wed, 06 May 2020 04:04:47 -0400
Received: from mx3.acri.fr ([5.252.148.15]:21020 helo=vwiexc030.acri.local)
 by eggs.gnu.org with esmtps (TLS1.0:ECDHE_RSA_AES_256_CBC_SHA1:256)
 (Exim 4.90_1) (envelope-from <julien.demaria@HIDDEN>)
 id 1jWF2s-0005Jn-BT
 for bug-coreutils@HIDDEN; Wed, 06 May 2020 04:04:46 -0400
Received: from VWIEXC030.acri.local ([192.168.101.30]) by vwiexc030.acri.local
 ([192.168.101.30]) with mapi id 14.03.0439.000;
 Wed, 6 May 2020 09:59:14 +0200
From: Julien Demaria <julien.demaria@HIDDEN>
To: "bug-coreutils@HIDDEN" <bug-coreutils@HIDDEN>
Subject: date --date '20180325 02:58:00' fails
Thread-Topic: date --date '20180325 02:58:00' fails
Thread-Index: AdYjfDuC61F86ludQ4mteqmbtAvVYA==
Date: Wed, 6 May 2020 07:59:13 +0000
Message-ID: <3B970FB76033264EB34479EC8A365E1104E9387401@HIDDEN>
Accept-Language: fr-FR, en-US
Content-Language: fr-FR
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
x-originating-ip: [192.168.102.204]
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
Received-SPF: pass client-ip=5.252.148.15;
 envelope-from=julien.demaria@HIDDEN; helo=vwiexc030.acri.local
X-detected-operating-system: by eggs.gnu.org: First seen = 2020/05/06 03:59:14
X-ACL-Warn: Detected OS   = Windows 7 or 8 [fuzzy]
X-Spam_score_int: -18
X-Spam_score: -1.9
X-Spam_bar: -
X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9,
 SPF_PASS=-0.001 autolearn=_AUTOLEARN
X-Spam_action: no action
X-Spam-Score: -1.4 (-)
X-Debbugs-Envelope-To: submit
X-Mailman-Approved-At: Wed, 06 May 2020 04:46:21 -0400
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.4 (--)

Hi,

We found this very suspect behavior:

$ date --date '20180325 02:58:00'
date: invalid date `20180325 02:58:00'

but for the previous day it works...:

$ date --date '20180323 02:58:00'
Fri Mar 23 02:58:00 CET 2018

Is it a bug?

Adding -u or setting TZ seems a workaround.

Tested with version 8.28 on Ubuntu 18.04.4 LTS
and also with version 8.13 on Debian GNU/Linux 7

Thanks in advance,
Julien




Acknowledgement sent to Julien Demaria <julien.demaria@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-coreutils@HIDDEN. Full text available.
Report forwarded to bug-coreutils@HIDDEN:
bug#41107; Package coreutils. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Mon, 10 Nov 2025 23:00:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.