summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2010-06-13 11:22:30 -0700
committerJunio C Hamano <gitster@pobox.com>2010-06-13 11:22:30 -0700
commitcde3eadad2fcacc90792a31d0c2ed6890f373e63 (patch)
treec641508b883fcc7f88bd4f3c442ff3ed03580a2e
parentb0fd34ecd5a386b7b09a0161413c50f957ac181e (diff)
parent75b37e704781a9ae4db2f0beaaa023638c06490d (diff)
downloadgit-cde3eadad2fcacc90792a31d0c2ed6890f373e63.tar.gz
Merge branch 'mc/maint-zoneparse'
* mc/maint-zoneparse: Add "Z" as an alias for the timezone "UTC"
-rw-r--r--date.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/date.c b/date.c
index 002aa3c8d6..6bae49ca33 100644
--- a/date.c
+++ b/date.c
@@ -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 */