summaryrefslogtreecommitdiffstats
path: root/lib/libc/gen/timezone.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libc/gen/timezone.c')
-rw-r--r--lib/libc/gen/timezone.c30
1 files changed, 15 insertions, 15 deletions
diff --git a/lib/libc/gen/timezone.c b/lib/libc/gen/timezone.c
index 370493b..fe3ce23 100644
--- a/lib/libc/gen/timezone.c
+++ b/lib/libc/gen/timezone.c
@@ -62,8 +62,8 @@ timezone(zone, dst)
register char *beg,
*end;
- if (beg = getenv("TZNAME")) { /* set in environment */
- if (end = index(beg, ',')) { /* "PST,PDT" */
+ if ( (beg = getenv("TZNAME")) ) { /* set in environment */
+ if ( (end = index(beg, ',')) ) {/* "PST,PDT" */
if (dst)
return(++end);
*end = '\0';
@@ -82,22 +82,22 @@ static struct zone {
char *stdzone;
char *dlzone;
} zonetab[] = {
- -1*60, "MET", "MET DST", /* Middle European */
- -2*60, "EET", "EET DST", /* Eastern European */
- 4*60, "AST", "ADT", /* Atlantic */
- 5*60, "EST", "EDT", /* Eastern */
- 6*60, "CST", "CDT", /* Central */
- 7*60, "MST", "MDT", /* Mountain */
- 8*60, "PST", "PDT", /* Pacific */
+ {-1*60, "MET", "MET DST"}, /* Middle European */
+ {-2*60, "EET", "EET DST"}, /* Eastern European */
+ {4*60, "AST", "ADT"}, /* Atlantic */
+ {5*60, "EST", "EDT"}, /* Eastern */
+ {6*60, "CST", "CDT"}, /* Central */
+ {7*60, "MST", "MDT"}, /* Mountain */
+ {8*60, "PST", "PDT"}, /* Pacific */
#ifdef notdef
/* there's no way to distinguish this from WET */
- 0, "GMT", 0, /* Greenwich */
+ {0, "GMT", 0}, /* Greenwich */
#endif
- 0*60, "WET", "WET DST", /* Western European */
- -10*60, "EST", "EST", /* Aust: Eastern */
- -10*60+30, "CST", "CST", /* Aust: Central */
- -8*60, "WST", 0, /* Aust: Western */
- -1
+ {0*60, "WET", "WET DST"}, /* Western European */
+ {-10*60,"EST", "EST"}, /* Aust: Eastern */
+ {-10*60+30,"CST", "CST"}, /* Aust: Central */
+ {-8*60, "WST", 0}, /* Aust: Western */
+ {-1}
};
/*
OpenPOWER on IntegriCloud