<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/date.c, branch v1.7.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v1.7.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v1.7.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2010-07-05T18:57:07Z</updated>
<entry>
<title>parse_date: fix signedness in timezone calculation</title>
<updated>2010-07-05T18:57:07Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2010-07-04T11:00:17Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=9ba0f0334dd505f78e0374bbe857c5e202f5a778'/>
<id>urn:sha1:9ba0f0334dd505f78e0374bbe857c5e202f5a778</id>
<content type='text'>
When no timezone is specified, we deduce the offset by
subtracting the result of mktime from our calculated
timestamp.

However, our timestamp is stored as an unsigned integer,
meaning we perform the subtraction as unsigned. For a
negative offset, this means we wrap to a very high number,
and our numeric timezone is in the millions of hours. You
can see this bug by doing:

   $ TZ=EST \
     GIT_AUTHOR_DATE='2010-06-01 10:00' \
     git commit -a -m foo
   $ git cat-file -p HEAD | grep author
   author Jeff King &lt;peff@peff.net&gt; 1275404416 +119304128

Instead, we should perform this subtraction as a time_t, the
same type that mktime returns.

Signed-off-by: Jeff King &lt;peff@peff.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'rr/parse-date-refactor'</title>
<updated>2010-06-21T13:02:47Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2010-06-21T13:02:47Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=8718e875080767f2c8d06c55c3fb5a6dddf0e5a0'/>
<id>urn:sha1:8718e875080767f2c8d06c55c3fb5a6dddf0e5a0</id>
<content type='text'>
* rr/parse-date-refactor:
  Refactor parse_date for approxidate functions
</content>
</entry>
<entry>
<title>Refactor parse_date for approxidate functions</title>
<updated>2010-06-07T22:52:43Z</updated>
<author>
<name>Ramkumar Ramachandra</name>
<email>artagnon@gmail.com</email>
</author>
<published>2010-06-03T20:28:55Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=c5043cc18579854681aa51ddb6e744fe2db24f51'/>
<id>urn:sha1:c5043cc18579854681aa51ddb6e744fe2db24f51</id>
<content type='text'>
approxidate_relative and approxidate_careful both use parse_date to
dump the timestamp to a character buffer and parse it back into a long
unsigned using strtoul(). Avoid doing this by creating a new
parse_date_toffset method.

Noticed-by: Jonathan Nieder &lt;jrnieder@gmail.com&gt;
Signed-off-by: Ramkumar Ramachandra &lt;artagnon@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Add "Z" as an alias for the timezone "UTC"</title>
<updated>2010-05-19T05:00:17Z</updated>
<author>
<name>Marcus Comstedt</name>
<email>marcus@mc.pp.se</email>
</author>
<published>2010-05-17T19:07:10Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=75b37e704781a9ae4db2f0beaaa023638c06490d'/>
<id>urn:sha1:75b37e704781a9ae4db2f0beaaa023638c06490d</id>
<content type='text'>
The name "Z" for the UTC timezone is required to properly parse ISO 8601
timestamps.  Add it to the list of recognized timezones.

Because timezone names can be shorter than 3 letters, loosen the
restriction in match_alpha() that used to require at least 3 letters to
match to allow a short timezone name as long as it matches exactly.  Prior
to the introduction of the "Z" zone, this already affected the timezone
"NT" (Nome).

Signed-off-by: Marcus Comstedt &lt;marcus@mc.pp.se&gt;
Reviewed-by: Jay Soffian &lt;jaysoffian@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'jc/maint-reflog-bad-timestamp'</title>
<updated>2010-01-27T22:57:37Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2010-01-27T22:57:37Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=103209c6782586d92b04ee1fc71c0fd6f6385f5f'/>
<id>urn:sha1:103209c6782586d92b04ee1fc71c0fd6f6385f5f</id>
<content type='text'>
* jc/maint-reflog-bad-timestamp:
  t0101: use a fixed timestamp when searching in the reflog
  Update @{bogus.timestamp} fix not to die()
  approxidate_careful() reports errorneous date string
</content>
</entry>
<entry>
<title>approxidate_careful() reports errorneous date string</title>
<updated>2010-01-26T21:51:41Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2010-01-26T19:58:00Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=93cfa7c7a85efbdb00daade4ad0afc11bd2fdf37'/>
<id>urn:sha1:93cfa7c7a85efbdb00daade4ad0afc11bd2fdf37</id>
<content type='text'>
For a long time, the time based reflog syntax (e.g. master@{yesterday})
didn't complain when the "human readable" timestamp was misspelled, as
the underlying mechanism tried to be as lenient as possible.  The funny
thing was that parsing of "@{now}" even relied on the fact that anything
not recognized by the machinery returned the current timestamp.

Introduce approxidate_careful() that takes an optional pointer to an
integer, that gets assigned 1 when the input does not make sense as a
timestamp.

As I am too lazy to fix all the callers that use approxidate(), most of
the callers do not take advantage of the error checking, but convert the
code to parse reflog to use it as a demonstration.

Tests are mostly from Jeff King.

Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>date.c: mark file-local function static</title>
<updated>2010-01-20T22:37:17Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2010-01-12T07:52:47Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=23418ea95f83177df19bfe18af33650b87ec2a8a'/>
<id>urn:sha1:23418ea95f83177df19bfe18af33650b87ec2a8a</id>
<content type='text'>
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Fix '--relative-date'</title>
<updated>2009-10-03T10:04:38Z</updated>
<author>
<name>Johan Sageryd</name>
<email>j416@1616.se</email>
</author>
<published>2009-10-03T04:20:18Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=dbc1b1f71052c084a84b5c395e1cb4b5ae526fcb'/>
<id>urn:sha1:dbc1b1f71052c084a84b5c395e1cb4b5ae526fcb</id>
<content type='text'>
This fixes '--relative-date' so that it does not give '0
year, 12 months', for the interval 360 &lt;= diff &lt; 365.

Signed-off-by: Johan Sageryd &lt;j416@1616.se&gt;
Signed-off-by: Jeff King &lt;peff@peff.net&gt;
</content>
</entry>
<entry>
<title>fix approxidate parsing of relative months and years</title>
<updated>2009-08-31T05:04:56Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2009-08-31T02:31:42Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=931e8e27d94dbc24abc9c969ae0b414e0361abff'/>
<id>urn:sha1:931e8e27d94dbc24abc9c969ae0b414e0361abff</id>
<content type='text'>
These were broken by b5373e9. The problem is that the code
marks the month and year with "-1" for "we don't know it
yet", but the month and year code paths were not adjusted to
fill in the current time before doing their calculations
(whereas other units follow a different code path and are
fine).

Signed-off-by: Jeff King &lt;peff@peff.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Add date formatting and parsing functions relative to a given time</title>
<updated>2009-08-31T02:59:11Z</updated>
<author>
<name>Alex Riesen</name>
<email>raa.lkml@gmail.com</email>
</author>
<published>2009-08-31T02:26:05Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=33012fc429af24fee64f39406d401662feb947a8'/>
<id>urn:sha1:33012fc429af24fee64f39406d401662feb947a8</id>
<content type='text'>
The main purpose is to allow predictable testing of the code.

Signed-off-by: Alex Riesen &lt;raa.lkml@gmail.com&gt;
Signed-off-by: Jeff King &lt;peff@peff.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
