Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
Merge branch 'mc/maint-zoneparse' into maint
author
Junio C Hamano
<gitster@pobox.com>
Mon, 21 Jun 2010 12:41:03 +0000
(
05:41
-0700)
committer
Junio C Hamano
<gitster@pobox.com>
Mon, 21 Jun 2010 12:41:03 +0000
(
05:41
-0700)
* mc/maint-zoneparse:
Add "Z" as an alias for the timezone "UTC"
date.c
patch
|
blob
|
history
raw
(from parent 1:
7a0d54f
)
diff --git
a/date.c
b/date.c
index 002aa3c8d6d4ff08d8790a155b8979bc117a2b95..6bae49ca330a69df5e2cf29e1e461f2490d99b2f 100644
(file)
--- 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 */