summaryrefslogtreecommitdiff
path: root/time/tst-posixtz.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2009-03-10 19:34:45 +0000
committerJakub Jelinek <jakub@redhat.com>2009-03-10 19:34:45 +0000
commitd4c583b4466962a9d9d4ca54ab6108dc7b42cdcc (patch)
tree0c0ae0f76861d31a4fa7e351d88b6539364cf9e8 /time/tst-posixtz.c
parent5c1d419918b3637170da9a5592049048aaf0ee49 (diff)
Updated to fedora-glibc-20090310T1925cvs/fedora-glibc-2_9_90-10
Diffstat (limited to 'time/tst-posixtz.c')
-rw-r--r--time/tst-posixtz.c30
1 files changed, 30 insertions, 0 deletions
diff --git a/time/tst-posixtz.c b/time/tst-posixtz.c
index ccba63e5b4..019d92ada0 100644
--- a/time/tst-posixtz.c
+++ b/time/tst-posixtz.c
@@ -18,6 +18,10 @@ struct
"1999/02/26 07:18:12 dst=1 zone=AEDST" },
{ 909312849L, "EST+5EDT,M4.1.0/2,M10.5.0/2",
"1998/10/25 05:54:09 dst=0 zone=EST" },
+ { 909312849L, "EST5EDT,M4.1.0/2,M10.5.0/2",
+ "1998/10/25 05:54:09 dst=0 zone=EST" },
+ { 909312849L, "<EST5>5EDT,M4.1.0/2,M10.5.0/2",
+ "1998/10/25 05:54:09 dst=0 zone=EST5" },
{ 924864849L, "EST+5EDT,M4.1.0/2,M10.5.0/2",
"1999/04/23 06:54:09 dst=1 zone=EDT" },
{ 919973892L, "EST+5EDT,M4.1.0/2,M10.5.0/2",
@@ -84,5 +88,31 @@ main (void)
puts (", FAIL");
}
+ setenv ("TZ", "<AB1>-10<AB2>-11,M10.5.0,M3.5.0", 1);
+ tzset ();
+ printf ("TZ = \"<AB1>-10<AB2>-11,M10.5.0,M3.5.0\" daylight %d"
+ " tzname = { \"%s\", \"%s\" }", daylight, tzname[0], tzname[1]);
+ if (daylight
+ && strcmp (tzname[0], "AB1") == 0 && strcmp (tzname[1], "AB2") == 0)
+ puts (", OK");
+ else
+ {
+ result = 1;
+ puts (", FAIL");
+ }
+
+ setenv ("TZ", "<BB1>-10", 1);
+ tzset ();
+ printf ("TZ = \"<BB1>-10\" daylight %d"
+ " tzname = { \"%s\", \"%s\" }", daylight, tzname[0], tzname[1]);
+ if (daylight == 0
+ && strcmp (tzname[0], "BB1") == 0 && strcmp (tzname[1], "BB1") == 0)
+ puts (", OK");
+ else
+ {
+ result = 1;
+ puts (", FAIL");
+ }
+
return result;
}