1
0
mirror of https://frontier.innolan.net/rainlance/amiga-tz.git synced 2025-11-23 14:24:13 +00:00
Files
amiga-tz/library/time_settzname.c
2015-07-29 20:14:38 +02:00

40 lines
1.0 KiB
C

//--------------------------------------------------------------------------//
// This file is in the public domain, so clarified as of //
// 2009-05-17 by Arthur David Olson. //
//--------------------------------------------------------------------------//
#include "time_header.h"
void settzname(void)
{
int i;
struct state* const sp = lclptr;
tzname[0] = tzname[1] = (char *) wildabbr;
daylight = 0;
timezone = 0;
altzone = 0;
if (sp == NULL) {
tzname[0] = tzname[1] = (char *) gmt;
return;
}
/*
** And to get the latest zone names into tzname. . .
*/
for (i = 0; i < sp->typecnt; ++i) {
const struct ttinfo * const ttisp = &sp->ttis[i];
update_tzname_etc(sp, ttisp);
}
for (i = 0; i < sp->timecnt; ++i) {
const struct ttinfo * const ttisp = &sp->ttis[sp->types[i]];
update_tzname_etc(sp, ttisp);
if (ttisp->tt_isdst)
daylight = 1;
}
}