source: trunk/testcase/625main.c@ 821

Last change on this file since 821 was 821, checked in by bird, 22 years ago

early testcase

  • Property cvs2svn:cvs-rev set to 1.1
  • Property svn:eol-style set to native
  • Property svn:executable set to *
  • Property svn:keywords set to Author Date Id Revision
File size: 862 bytes
RevLine 
[821]1/* $Id: 625main.c 821 2003-10-08 13:18:16Z bird $
2 *
3 * TZ (tzset++) testcase.
4 *
5 * InnoTek Systemberatung GmbH confidential
6 *
7 * Copyright (c) 2003 InnoTek Systemberatung GmbH
8 * Author: knut st. osmundsen <bird-srcspam@anduin.net>
9 *
10 * All Rights Reserved
11 *
12 */
13#include <time.h>
14#include <stdio.h>
15#include <stdlib.h>
16
17void printtz(void)
18{
19 const char *pszTZ = getenv("TZ");
20 tzset();
21 printf("TZ=%s\n\ttimezone=%d\t daylight=%d\ttzname='%s','%s'\n",
22 pszTZ,
23 #ifdef __IBMC__
24 _timezone,
25 #else
26 timezone,
27 #endif
28 daylight,
29 tzname[0],
30 tzname[1]);
31}
32
33int main()
34{
35 printtz();
36 putenv("TZ=CET-1CDT,3,-1,0,7200,10,-1,0,10800,3600");
37 printtz();
38 putenv("TZ=PST8PDT");
39 printtz();
40 putenv("TZ=CET-1CDT,3,-1,0,10800,10,-1,0,7200,3600");
41 printtz();
42 putenv("TZ=");
43 printtz();
44 return 0;
45}
46
Note: See TracBrowser for help on using the repository browser.