helpGNU Core Utilities - Support: sr #108179, date returns wrong date with...


You are not allowed to post comments on this tracker with your current authentification level.

sr #108179: date returns wrong date with ISO8601 short form

Submitted by:  None
Submitted on:  Tue 13 Nov 2012 09:38:16 PM UTC  
Category: NonePriority: 5 - Normal
Severity: 3 - NormalStatus: None
Privacy: PublicAssigned to: None
Originator Email: -unavailable-Open/Closed: Open
Operating System: GNU/Linux

Mon 05 Aug 2013 05:06:38 PM UTC, comment #1:

The basic format is not suppported yet. There is a bug report about it:

Mihai C. <mihaic>
Tue 13 Nov 2012 09:38:16 PM UTC, original submission:

I found this in the packaged version of coreutils 8.13 on Debian 7 (currently still in beta), then verified it on a local build of coreutils 8.20.

Per my reading of the Wikipedia article on ISO 8601 (, these two date strings should both be valid and both represent the same date:


Yet when I pass them both to "date -d" I get different results (the short form gives an unexpected result; the expanded form is correct). If I replace the 'T' with a space, "date -d" gives me the expected result for both forms.

$ src/date -d "20121113T1200"
Mon Nov 12 21:00:00 PST 2012
$ src/date -d "20121113 1200"
Tue Nov 13 12:00:00 PST 2012
$ src/date -d "2012-11-13 12:00"
Tue Nov 13 12:00:00 PST 2012
$ src/date -d "2012-11-13T12:00"
Tue Nov 13 12:00:00 PST 2012
$ src/date --version
date (GNU coreutils) 8.20
Copyright (C) 2012 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <>.
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.



No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -unavailable- added by mihaic (Posted a comment)
  • -unavailable- added by None (Submitted the item)

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.


    Please enter the title of George Orwell's famous dystopian book (it's a date):



    No Changes Have Been Made to This Item

    Back to the top

    Powered by Savane 3.1-cleanup