Re: [BUG] internal date format does not accept small unix timestamps
- From
Junio C Hamano <gitster@pobox.com>
- Date
- May 29, 2026, 22:52 UTC
- Message-ID
- <xmqq7bolg762.fsf@gitster.g>
- In-Reply-To
- <08a04d91-af90-44dd-b28f-f3d5b9e77413@luna.gl>
Luna Schwalbe <dev@luna.gl> writes:
Show 8 quoted lines
> > Apparently you need `@` in front for small Unix Epoch values. `@0 +0000` > > That is wonderful, thank you so much, I somehow did not find this small > detail anywhere. > > Maybe it could be added to Documentation/date-formats.adoc? > > Luna
Good suggestion.
This was introduced in 116eb3ab (parse_date(): allow ancient git-timestamp, 2012-02-02) and 2c733fb2 (parse_date(): '@' prefix forces git-timestamp, 2012-02-02) to allow specifying "ancient" timestamps (like 0 +0000) without conflicting with YYYYMMDD date formats. I do not think neither commit added documentation for this '@' prefix, and Documentation/date-formats would be an excellent place to do so.
Care to whip up a patch?
Thanks.