<feed xmlns='http://www.w3.org/2005/Atom'>
<title>user/sven/git.git/date.c, branch v1.6.4.5</title>
<subtitle>Git
</subtitle>
<id>https://git.stealer.net/cgit.cgi/user/sven/git.git/atom?h=v1.6.4.5</id>
<link rel='self' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/atom?h=v1.6.4.5'/>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/'/>
<updated>2009-08-28T02:59:00Z</updated>
<entry>
<title>Round-down years in "years+months" relative date view</title>
<updated>2009-08-28T02:59:00Z</updated>
<author>
<name>David Reiss</name>
<email>dreiss@facebook.com</email>
</author>
<published>2009-08-27T23:39:38Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=607a9e8aaa9b1a18f81ae67e40a5c8a5d1a92577'/>
<id>urn:sha1:607a9e8aaa9b1a18f81ae67e40a5c8a5d1a92577</id>
<content type='text'>
Previously, a commit from 1 year and 7 months ago would display as
"2 years, 7 months ago".

Signed-off-by: David Reiss &lt;dreiss@facebook.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Work around BSD whose typeof(tv.tv_sec) != time_t</title>
<updated>2009-05-06T05:19:14Z</updated>
<author>
<name>Bernd Ahlers</name>
<email>bernd@ba-net.org</email>
</author>
<published>2009-04-06T17:26:37Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=f697b33b015fcb0c90210840eb4ef8e6a18d4bdf'/>
<id>urn:sha1:f697b33b015fcb0c90210840eb4ef8e6a18d4bdf</id>
<content type='text'>
According to POSIX, tv_sec is supposed to be a time_t, but OpenBSD
(and FreeBSD, too) defines it to be a long, which triggers a type
mismatch when a pointer to it is given to localtime_r().

Acked-by: Jeff King &lt;peff@peff.net&gt;

Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>never fallback relative times to absolute</title>
<updated>2009-02-25T08:44:43Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2009-02-24T05:42:16Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=10edf37796badc58239eb3e5d1e8e608f6e1473c'/>
<id>urn:sha1:10edf37796badc58239eb3e5d1e8e608f6e1473c</id>
<content type='text'>
Previously, for dates older than 12 months we fell back to just giving the
absolute time.  This can be a bit jarring when reading a list of times.

Instead, let's switch to "Y years, M months" for five years, and then just
"Y years" after that.

No particular reason on the 5 year cutoff except that it seemed reasonable
to me.

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>Support 'raw' date format</title>
<updated>2009-02-21T05:45:42Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2009-02-20T22:15:22Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=7dff9b30ea0603fe265f9f7da055fc34f5d57d2f'/>
<id>urn:sha1:7dff9b30ea0603fe265f9f7da055fc34f5d57d2f</id>
<content type='text'>
Talking about --date, one thing I wanted for the 1234567890 date was to
get things in the raw format. Sure, you get them with --pretty=raw, but it
felt a bit sad that you couldn't just ask for the date in raw format.

So here's a throw-away patch (meaning: I won't be re-sending it, because I
really don't think it's a big deal) to add "--date=raw". It just prints
out the internal raw git format - seconds since epoch plus timezone (put
another way: 'date +"%s %z"' format)

Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>date/time: do not get confused by fractional seconds</title>
<updated>2008-08-18T00:41:53Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2008-08-17T04:25:40Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=9f2b6d2936a7c4bb3155de8efec7b10869ca935e'/>
<id>urn:sha1:9f2b6d2936a7c4bb3155de8efec7b10869ca935e</id>
<content type='text'>
The date/time parsing code was confused if the input time HH:MM:SS is
followed by fractional seconds.  Since we do not record anything finer
grained than seconds, we could just drop fractional part, but there is a
twist.

We have taught people that not just spaces but dot can be used as word
separators when spelling things like:

    $ git log --since 2.days
    $ git show @{12:34:56.7.days.ago}

and we shouldn't mistake "7" in the latter example as a fraction and
discard it.

The rules are:

 - valid days of month/mday are always single or double digits.

 - valid years are either two or four digits

   No, we don't support the year 600 _anyway_, since our encoding is based
   on the UNIX epoch, and the day we worry about the year 10,000 is far
   away and we can raise the limit to five digits when we get closer.

 - Other numbers (eg "600 days ago") can have any number of digits, but
   they cannot start with a zero. Again, the only exception is for
   two-digit numbers, since that is fairly common for dates ("Dec 01" is
   not unheard of)

So that means that any milli- or micro-second would be thrown out just
because the number of digits shows that it cannot be an interesting date.

A milli- or micro-second can obviously be a perfectly fine number
according to the rules above, as long as it doesn't start with a '0'. So
if we have

	12:34:56.123

then that '123' gets parsed as a number, and we remember it. But because
it's bigger than 31, we'll never use it as such _unless_ there is
something after it to trigger that use.

So you can say "12:34:56.123.days.ago", and because of the "days", that
123 will actually be meaninful now.

Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Make my_mktime() public and rename it to tm_to_time_t()</title>
<updated>2008-06-23T11:40:29Z</updated>
<author>
<name>Johannes Sixt</name>
<email>johannes.sixt@telecom.at</email>
</author>
<published>2008-06-23T06:31:41Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=bb5799d6ef3ad7ee70a138b82e67b93e3aaa8017'/>
<id>urn:sha1:bb5799d6ef3ad7ee70a138b82e67b93e3aaa8017</id>
<content type='text'>
We will use it from the MinGW port's gettimeofday() substitution.

Signed-off-by: Johannes Sixt &lt;johannes.sixt@telecom.at&gt;
</content>
</entry>
<entry>
<title>Fix approxidate("never") to always return 0</title>
<updated>2008-06-17T23:40:09Z</updated>
<author>
<name>Olivier Marin</name>
<email>dkr@freesurf.fr</email>
</author>
<published>2008-06-17T16:34:57Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=8c6b57860d9be5f346c9589a08c9e7c04eeaf99b'/>
<id>urn:sha1:8c6b57860d9be5f346c9589a08c9e7c04eeaf99b</id>
<content type='text'>
Commit af66366a9feb0194ed04b1f538998021ece268a8 introduced the keyword
"never" to be used with approxidate() but defined it with a fixed date
without taking care of timezone. As a result approxidate() will return
a timestamp in the future with a negative timezone.

With this patch, approxidate("never") always return 0 whatever your
timezone is.

Signed-off-by: Olivier Marin &lt;dkr@freesurf.fr&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>timezone_names[]: fixed the tz offset for New Zealand.</title>
<updated>2008-02-26T05:56:10Z</updated>
<author>
<name>Steven Drake</name>
<email>sdrake@ihug.co.nz</email>
</author>
<published>2008-02-26T00:45:53Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=695ed47228021f7408f58e6174168ea583c448d0'/>
<id>urn:sha1:695ed47228021f7408f58e6174168ea583c448d0</id>
<content type='text'>
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>parse_date_format(): convert a format name to an enum date_mode</title>
<updated>2007-09-30T03:31:59Z</updated>
<author>
<name>Andy Parkins</name>
<email>andyparkins@gmail.com</email>
</author>
<published>2007-09-28T14:17:31Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=856665f827c31ace3f19e672f8911f7f15f2a0e2'/>
<id>urn:sha1:856665f827c31ace3f19e672f8911f7f15f2a0e2</id>
<content type='text'>
Factor out the code to parse --date=&lt;format&gt; parameter to revision
walkers into a separate function, parse_date_format().  This function
is passed a string and converts it to an enum date_format:

 - "relative"         =&gt; DATE_RELATIVE
 - "iso8601" or "iso" =&gt; DATE_ISO8601
 - "rfc2822"          =&gt; DATE_RFC2822
 - "short"            =&gt; DATE_SHORT
 - "local"            =&gt; DATE_LOCAL
 - "default"          =&gt; DATE_NORMAL

In the event that none of these strings is found, the function die()s.

Signed-off-by: Andy Parkins &lt;andyparkins@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Teach approxidate() to understand "never"</title>
<updated>2007-07-25T00:28:10Z</updated>
<author>
<name>Johannes Schindelin</name>
<email>Johannes.Schindelin@gmx.de</email>
</author>
<published>2007-07-24T18:18:34Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=af66366a9feb0194ed04b1f538998021ece268a8'/>
<id>urn:sha1:af66366a9feb0194ed04b1f538998021ece268a8</id>
<content type='text'>
If you want to keep the reflogs around for a really long time, you should be
able to say so:

	$ git config gc.reflogExpire never

Now it works, too.

Signed-off-by: Johannes Schindelin &lt;johannes.schindelin@gmx.de&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
