Skip to content
Snippets Groups Projects
Commit c68be3f7 authored by Simon Peyton Jones's avatar Simon Peyton Jones
Browse files

[project @ 1997-03-18 20:50:32 by simonpj]

Add timezone.h
parent a28b8057
No related merge requests found
#ifndef TIMEZONE_H
#define TIMEZONE_H
#define _OSF_SOURCE
#if TIME_WITH_SYS_TIME
# include <sys/time.h>
# include <time.h>
#else
# if HAVE_SYS_TIME_H
# include <sys/time.h>
# else
# include <time.h>
# endif
#endif
#if HAVE_TM_ZONE
#define ZONE(x) (((struct tm *)x)->tm_zone)
#define SETZONE(x,z) (((struct tm *)x)->tm_zone = z)
#define GMTOFF(x) (((struct tm *)x)->tm_gmtoff)
#else
#if HAVE_TZNAME
extern time_t timezone, altzone;
extern char *tzname[2];
#define ZONE(x) (((struct tm *)x)->tm_isdst ? tzname[1] : tzname[0])
#define SETZONE(x,z)
#define GMTOFF(x) (((struct tm *)x)->tm_isdst ? altzone : timezone)
#endif
#endif
#endif
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment