]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
parsedate: support UT timezone
authorNikos Tsipinakis <nikos@tsipinakis.com>
Mon, 19 Mar 2018 13:42:36 +0000 (15:42 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Mon, 19 Mar 2018 18:22:42 +0000 (19:22 +0100)
RFC822 section 5.2 mentions Universal Time, 'UT', to be synonymous with
GMT.

Closes #2401

lib/parsedate.c
tests/libtest/lib517.c

index aa27303fc00fb7187d52176d02799b84505bf868..3d3c00b4f1eeb5475a469fe87bde814ddd90e907 100644 (file)
@@ -119,6 +119,7 @@ static int parsedate(const char *date, time_t *output);
 #define tDAYZONE -60       /* offset for daylight savings time */
 static const struct tzinfo tz[]= {
   {"GMT", 0},              /* Greenwich Mean */
+  {"UT",  0},              /* Universal Time */
   {"UTC", 0},              /* Universal (Coordinated) */
   {"WET", 0},              /* Western European */
   {"BST", 0 tDAYZONE},     /* British Summer */
index e7451907c062554c136f6609e405a732b6613ffb..2f7d9a01129f9cd21d4bfebadbb29e5fd96ad955 100644 (file)
@@ -47,6 +47,7 @@ static struct dcheck dates[] = {
   {"Sun/Nov/6/94/GMT", 784080000 },
   {"Sun, 06 Nov 1994 08:49:37 CET", 784108177 },
   {"06 Nov 1994 08:49:37 EST", 784129777 },
+  {"Sun, 06 Nov 1994 08:49:37 UT", 784111777 },
   {"Sun, 12 Sep 2004 15:05:58 -0700", 1095026758 },
   {"Sat, 11 Sep 2004 21:32:11 +0200", 1094931131 },
   {"20040912 15:05:58 -0700", 1095026758 },