Bug#781647: git: git commit --date ignores timezone, always uses UTC/GMT

2015-04-06 Thread RjY
I previously wrote:
>It seems --date always uses UTC instead of the user's timezone.

The issue seems a little more complicated than this; I observe that
specifying today's date along with the time picks up that we are in
British Summer Time, and gets the correct timezone offset.

With only a time specified, timezone is incorrectly +:

% git ci -m test --date='16:00:00'
[master (root-commit) 2c8ea98] test
 Date: Mon Apr 6 15:00:00 2015 +
 1 file changed, 0 insertions(+), 0 deletions(-)
 create mode 100644 f

With a date and time specified, timezone is correctly +0100:

% git ci --amend --date='2015-04-06 16:00:00'
[master 534ec11] test
 Date: Mon Apr 6 16:00:00 2015 +0100
 1 file changed, 0 insertions(+), 0 deletions(-)
 create mode 100644 f

So my assumption the parser would do the right thing with today's date
if I only specified the time seems to be the cause of the problem.

I hope the reader will agree this is rather counterintuitive behaviour.
It seems reasonable to expect that the user who specified only a time
meant "that time today", and the software would act exactly the same way
as it does when today's date is written explicitly.

Finally, I wonder if this might be the same as / related to #762585.

-- 
http://rjy.org.uk/


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Bug#781647: git: git commit --date ignores timezone, always uses UTC/GMT

2015-04-01 Thread RjY
Package: git
Version: 1:2.1.4-2.1
Severity: normal

It seems --date always uses UTC instead of the user's timezone.

When trying to specify the author date of a commit, I observe:

% git ci --date='08:39:39' -am "r_patch.c: FillEmptyPixels: code common to 
createPatch/Texture"
[master 5734838] r_patch.c: FillEmptyPixels: code common to 
createPatch/Texture
 Date: Wed Apr 1 07:39:39 2015 +
 1 file changed, 52 insertions(+), 86 deletions(-)

I expected 08:39:39 +0100, but I get 07:39:39 +.

Trying to force it also has no effect:

% git ci --amend --date='08:39:39 +0100'
[master ee62730] r_patch.c: FillEmptyPixels: code common to 
createPatch/Texture
 Date: Wed Apr 1 07:39:39 2015 +
 1 file changed, 52 insertions(+), 86 deletions(-)

(Noticed since the UK recently switched from GMT to BST.)

-- 
http://rjy.org.uk/


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org