/* $Id: 625main.c 822 2003-10-08 13:31:15Z bird $ * * TZ (tzset++) testcase. * * InnoTek Systemberatung GmbH confidential * * Copyright (c) 2003 InnoTek Systemberatung GmbH * Author: knut st. osmundsen * * All Rights Reserved * */ #include #include #include void printtz(void) { const char *pszTZ = getenv("TZ"); tzset(); printf("TZ=%s\n\ttimezone=%d\t daylight=%d\ttzname='%s','%s'\n", pszTZ, #ifdef __IBMC__ _timezone, #else timezone, #endif daylight, tzname[0], tzname[1]); } int main() { printtz(); putenv("TZ=PST8PDT"); printtz(); putenv("TZ=CET-1CDT,3,-1,0,7200,10,-1,0,10800,3600"); printtz(); putenv("TZ=CET-1CEST,3,-1,0,7200,10,-1,0,10800,3600"); printtz(); putenv("TZ="); printtz(); return 0; }