[PATCH 1 of 2] Allow commit date before Unix epoch

Yuya Nishihara yuya at tcha.org
Fri Apr 1 15:27:07 UTC 2016


On Fri, 1 Apr 2016 04:00:24 +0200, Florent Gallaire wrote:
> # HG changeset patch
> # User Florent Gallaire <fgallaire at gmail.com>
> # Date 1459212616 -7200
> #      Tue Mar 29 02:50:16 2016 +0200
> # Node ID ece34634e504271cf2a1dc696a2a0486a8b13488
> # Parent  0e330d7d9f53fc37cbeee8d1389a06465eca2241
> date: allow negative timestamp
> 
> DCVS are very useful to store various texts (as legislation) written before
> Unix epoch. Fri, 13 Dec 1901 is a nice gain over Thu, 01 Jan 1970.

Still I don't think it is a good idea to allow a negative timestamp. It
can be a source of bugs since we're likely to take a timestamp as a positive
integer. Also, (time_t)-1 represents an error in C layer.


More information about the Mercurial-devel mailing list