Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4002254
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T08:00:15+00:00 2026-05-20T08:00:15+00:00

EDIT : Summary : Git does not allow dates before 1973/03/03 09:46:40 (epoch+100000000s) given

  • 0

EDIT: Summary: Git does not allow dates before 1973/03/03 09:46:40 (epoch+100000000s) given in its “internal date format” (seconds since the epoch). This is to allow “20110224” as short form of “2011-02-24”. — This Is no bug: Not really, but it is not documented as well. — Workaround: Do not rely on the git internal date when you cannot. — Thanks to: hobbs

Hi all,

I have some issues with git filter-branch that I have tracked down to git commit-tree. Consider this script:

#!/bin/bash
# please run these commands in an empty directory
# (should not destroy an existing repo, though. I think it would only
# a few dangling objects)

set -e -o pipefail

git init
tree=$(git write-tree)
commit=$(echo "my first commit -- the tree is empty" |
     env GIT_AUTHOR_DATE="0 +0000" git commit-tree $tree)

echo "This is commit $commit:"
git cat-file commit $commit

Note that the env GIT_AUTHOR_DATE="0 +0000" sets the date using the “Git internal format” — see git-commit-tree’s manpage for details — to 1970-01-01.

But the output of this script (the raw commit) is

tree 4b825dc642cb6eb9a060e54bf8d69288fbee4904
author Jane Doe <jane> 1298477214 +0100
committer Jane Doe <jane> 1298477214 +0100

my first commit -- the tree is empty

Now why is git ignoring $GIT_AUTHOR_DATE? If that is of significance, my git --version gives git version 1.7.1.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T08:00:16+00:00Added an answer on May 20, 2026 at 8:00 am

    Found in the git date parser code:

    /*
     * Seconds since 1970? We trigger on that for any numbers with
     * more than 8 digits. This is because we don't want to rule out
     * numbers like 20070606 as a YYYYMMDD date.
     */
    if (num >= 100000000 && nodate(tm)) {
    

    Since that code explicitly rejects small numbers as possible unix-dates, and the string doesn’t parse as any other date format, GIT_AUTHOR_DATE is treated as invalid and ignored entirely (and apparently, silently).

    Your method should work fine though as long as you stick to synthesizing commits that took place after 1973. Otherwise, use one of the other date formats 🙂

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

You may have noticed that we now show an edit summary on Community Wiki
EDIT: Learned that Webmethods actually uses NLST, not LIST, if that matters Our business
edit #2: Question solved halfways. Look below As a follow-up question, does anyone know
Edit: This question was written in 2008, which was like 3 internet ages ago.
Edit: From another question I provided an answer that has links to a lot
EDIT: This was formerly more explicitly titled: - Best solution to stop Kontiki's KHOST.EXE
EDIT: This question is more about language engineering than C++ itself. I used C++
EDIT What small things which are too easy to overlook do I need to
Edit : Solved, there was a trigger with a loop on the table (read
Edit: This was accidentally posted twice. Original: VB.NET Importing Classes I've seen some code

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.