mirror of
https://github.com/git/git.git
synced 2025-03-16 11:55:16 +00:00
Merge branch 'pe/date'
* pe/date: date.c: improve guess between timezone offset and year.
This commit is contained in:
commit
8c278abcbe
2
date.c
2
date.c
@ -369,7 +369,7 @@ static int match_digit(const char *date, struct tm *tm, int *offset, int *tm_gmt
|
|||||||
|
|
||||||
/* Four-digit year or a timezone? */
|
/* Four-digit year or a timezone? */
|
||||||
if (n == 4) {
|
if (n == 4) {
|
||||||
if (num <= 1200 && *offset == -1) {
|
if (num <= 1400 && *offset == -1) {
|
||||||
unsigned int minutes = num % 100;
|
unsigned int minutes = num % 100;
|
||||||
unsigned int hours = num / 100;
|
unsigned int hours = num / 100;
|
||||||
*offset = hours*60 + minutes;
|
*offset = hours*60 + minutes;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user