Skip to content

date: fails to parse +N and -N in absolute time string as a time zone #7065

@jfinkels

Description

@jfinkels

Environment: Ubuntu 20.04, uutils main branch (git commit 88cdf16), GNU coreutils v8.30

Steps to reproduce:

TZ=UTC0 date -d '1997-01-19 08:17:48 +0'

What happens now: uutils date terminates with an error because it doesn't understand the +0 time zone:

date: invalid date '1997-01-19 08:17:48 +0'

If you remove the +0, then uutils date does successfully parse the date string.

What I expected to happen: GNU date successfully interprets the +0 as a time zone:

Sun 19 Jan 1997 08:17:48 AM UTC

Notes: this is causing a test failure in GNU test file tests/date/date.pl.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions