diff options
author | Junio C Hamano <gitster@pobox.com> | 2010-06-21 05:41:03 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2010-06-21 05:41:03 -0700 |
commit | e7e1bf0c29f20c505869d2dda7ddb26470f6ebc5 (patch) | |
tree | ef844cfe70d017ebb1a32016d4d7fb4655764f06 | |
parent | Merge branch 'jk/diff-m-doc' into maint (diff) | |
parent | Add "Z" as an alias for the timezone "UTC" (diff) | |
download | tgif-e7e1bf0c29f20c505869d2dda7ddb26470f6ebc5.tar.xz |
Merge branch 'mc/maint-zoneparse' into maint
* mc/maint-zoneparse:
Add "Z" as an alias for the timezone "UTC"
-rw-r--r-- | date.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -229,6 +229,7 @@ static const struct { { "GMT", 0, 0, }, /* Greenwich Mean */ { "UTC", 0, 0, }, /* Universal (Coordinated) */ + { "Z", 0, 0, }, /* Zulu, alias for UTC */ { "WET", 0, 0, }, /* Western European */ { "BST", 0, 1, }, /* British Summer */ @@ -305,7 +306,7 @@ static int match_alpha(const char *date, struct tm *tm, int *offset) for (i = 0; i < ARRAY_SIZE(timezone_names); i++) { int match = match_string(date, timezone_names[i].name); - if (match >= 3) { + if (match >= 3 || match == strlen(timezone_names[i].name)) { int off = timezone_names[i].offset; /* This is bogus, but we like summer */ |