# git commit --date format

2 messages from 2015-04-13 to 2015-04-14. Participants: 乙酸鋰, Junio C Hamano.
Thread: https://gitlist.dev/t/39063

## 乙酸鋰, 2015-04-13 15:42

Subject: git commit --date format
Message-ID: <CAHtLG6SPqoZJ+bc6eaHEAkEN9VAwuq+hh4OUG8opOETRQKfUyg@mail.gmail.com>
URL: https://gitlist.dev/e/CAHtLG6SPqoZJ%2Bbc6eaHEAkEN9VAwuq%2Bhh4OUG8opOETRQKfUyg%40mail.gmail.com

```
Hi,

In git < 2.0, git commit --amend --date="" can amend commit with
current time as author time.
But since git 2.0, this does not work, dying with "invalid date format".
I have to instead type git commit --amend --date="now".
Is empty string date format no longer supported? Or will be fixed?

```

## Junio C Hamano, 2015-04-14 17:10

Subject: Re: git commit --date format
Message-ID: <xmqqoamq3aak.fsf@gitster.dls.corp.google.com>
URL: https://gitlist.dev/e/xmqqoamq3aak.fsf%40gitster.dls.corp.google.com
In-Reply-To: <CAHtLG6SPqoZJ+bc6eaHEAkEN9VAwuq+hh4OUG8opOETRQKfUyg@mail.gmail.com>

```
乙酸鋰 <ch3cooli@gmail.com> writes:

> Hi,
>
> In git < 2.0, git commit --amend --date="" can amend commit with
> current time as author time.
> But since git 2.0, this does not work, dying with "invalid date format".
> I have to instead type git commit --amend --date="now".
> Is empty string date format no longer supported? Or will be fixed?

I think this was a fix to the overly loose parser which took any
typo (including an empty string, e.g. --date="$prevuois" that
misspels the name of a shell variable that has the timestamp) as
"now".

```
