Josh Triplett wrote:
> Git's "raw" date format consists of the seconds since the epoch as an
> integer, followed by a timezone offset. I wanted to generate a dummy
> commit with a date of the epoch, so I specified
> GIT_AUTHOR_DATE='0 +0000'. However, git said "fatal: invalid date
> format: 0 +0000". From looking at the code, it turns out that git won't
> accept seconds-since-the-epoch unless greater than 100000000.
Yep, that's true. Git generally expects realistic dates (much to the
annoyance of people trying to track historical documents like the
Constitution of the United States in it). If the error message were
changed to specify what about the date it doesn't like, would that
help?
Perhaps the rule should be, wherever you see a timezone, it has to be
preceded by a time (seconds-since-epoch or hh:mm:ss[.sss...]).
Otherwise the command
git commit --date='19970101 +0000'
has ambiguous meaning.
--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]