1

I'm trying to make a commit before the epoch time but it seems that if I'm doing so, git says the date is sometime in 2014:

$ git commit -m 'Minor' --date 'Wed Dec 31 00:00:00 1969 +0000' . --amend
[master 4d1ea4d] Minor
 Date: Tue Dec 30 23:00:00 2014 +0200
 1 file changed, 2 insertions(+)

However it does work if I make the commit in the epoch time:

$ git commit -m 'Minor' --date 'Thu Jan 1 00:00:00 1970 +0000' . --amend
[master d0623ee] Minor
 Date: Thu Jan 1 00:00:00 1970 +0000
 1 file changed, 2 insertions(+)

Why? How can I force Git to accept my commit before 1970? I remember I did it sometime, but using an older version of git. Currently I'm using git version 2.1.4. Maybe changing the source code and recompiling my own git will work?

I need this for experimental reasons–just in case some of you will ask why. :)

Ionică Bizău
  • 109,027
  • 88
  • 289
  • 474

1 Answers1

2

This isn't yet possible, as I mentioned in "Is it possible to set a git commit to have a timestamp prior to 1970?"

You can store a date prior to 1970, but you cannot guarantee that it will be correctly represented.

Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250