30 lines
916 B
C
30 lines
916 B
C
#ifndef _TIME_RULE_H
|
|
#define _TIME_RULE_H
|
|
|
|
#include "time_types.h"
|
|
|
|
/*
|
|
* The DST rules to use if TZ has no rules and we can't load TZDEFRULES.
|
|
* We default to US rules as of 1999-08-17.
|
|
* POSIX 1003.1 section 8.1.1 says that the default DST rules are
|
|
* implementation dependent; for historical reasons, US rules are a
|
|
* common default.
|
|
*/
|
|
#ifndef TZDEFRULESTRING
|
|
# define TZDEFRULESTRING ",M4.1.0,M10.5.0"
|
|
#endif
|
|
|
|
struct rule {
|
|
int r_type; /* type of rule; see below */
|
|
int r_day; /* day number of rule */
|
|
int r_week; /* week number of rule */
|
|
int r_mon; /* month number of rule */
|
|
int_fast32_t r_time; /* transition time of rule */
|
|
};
|
|
|
|
#define JULIAN_DAY 0 /* Jn = Julian day */
|
|
#define DAY_OF_YEAR 1 /* n = day of year */
|
|
#define MONTH_NTH_DAY_OF_WEEK 2 /* Mm.n.d = month, week, day of week */
|
|
|
|
#endif
|