Go to the source code of this file.
Functions | |
int | dateyylex () |
Parser's entry point (created by flex). | |
int | set_local_TZ_to_GMT () |
Set the local time zone to GTM (which is equivalent to UTC). | |
int | load_timezones (char *filename) |
Load time zones definitions. | |
int | tzcmp (struct timezones *tz1, struct timezones *tz2) |
Compare 2 timezone structures. | |
int | tzfound (struct timezones *tzz) |
Find a time zone data structure in the time zone configuration file. | |
int | get_day (char *day) |
Returns the index of the day (starting at 0, so the returned value is between 0 and 6). The first day (index 0) is 'Sunday'. | |
int | get_month (char *month) |
Returns the index of the month (starting at 0, so the returned value is between 0 and 11). The first month (index 0) is 'january'. | |
char * | print_tz_conf () |
Returns a zero terminated string of characters that represents the time zones configuration. | |
char * | date2timestamp (char *date, char *timestamp, int nbcar, int shift) |
Calculate the timestamp of a ticket (The number of seconds since the first of January 1970). | |
char * | dater () |
Return the current date as Apache's standard. | |
int | ttreflex () |
Lexical parser build by the flex utility (for parsing the timestamps references configuration file). | |
int | test_tz_conf (char *config_file, int auto_conf) |
Check the time zone configuration data against well known couple (date, timestamps). | |
time_t | get_utc_timestamp () |
Return the number of seconds since 00:00:00 UTC, January 1, 1970. | |
char * | get_tsm_date (time_t timestamp, int debug) |
Format a TSM date (ex: "Tue Sep 17 11:48:39 MET 2002") from a given timestamp. | |
Variables | |
int | date_line_num |
Current line in the time zones definitions file. | |
tz_tab | tzs |
This structure contains the date 'timezone', 'daylight', 'time shift'. | |
FILE * | dateyyin |
Parser's input stream (used by dateyylex()). | |
char * | tzname [2] |
This array should contain "MET" and "MET DST" for TZ=MET. | |
time_t | timezone |
The external time_t variable altzone contains the difference, in seconds, between Coordinated Universal Time and the alternate time zone. | |
int | daylight |
The external variable daylight indicates whether time should reflect daylight savings time. Both timezone and altzone default to 0 (UTC). The external variable daylight is non-zero if an alternate time zone exists. | |
timezones * | current_tz |
The function date2timestamp() lookups the structure 'tzs' to find the correct timezone configuration for the current date actually processed. This variable points to the current time zone configuration that aplies to the currently scaned date. | |
char * | days [7] |
Contains the names of the 7 days of the week. | |
char * | months [12] |
Contains the names of the 12 months of the year. | |
int | ttref_line_num = 0 |
Current line number being parsed by the time zones reference parsed. | |
ttref_tab | ttrefs |
Data structure that contains all the couples (date, timestamp) used as reference. | |
FILE * | ttrefin |
Pointer to the stream descriptor used by the timestamps references parser. |
Definition in file date.c.
|
Calculate the timestamp of a ticket (The number of seconds since the first of January 1970).
Definition at line 262 of file date.c. References AUTOMATIC_TIME_SHIFT_COMPUTATION, CLOCK, current_tz, DAY_OF_THE_MONTH, DAY_OF_THE_WEEK, timezones::daylight, DAYLIGHT_SIZE, free_fields(), get_day(), get_month(), HOUR, MINUTES, MONTH, fields::number_of_fields, s_split(), SECONDS, timezones::shift, fields::tabs, TAG1, TAG2, timezones::timezone, TIMEZONE_SIZE, tzfound(), and YEAR. Referenced by test_tz_conf(). |
|
Return the current date as Apache's standard.
Definition at line 500 of file date.c. References MAX_TIMER_SIZE. |
|
Returns the index of the day (starting at 0, so the returned value is between 0 and 6). The first day (index 0) is 'Sunday'.
Definition at line 175 of file date.c. References days. Referenced by date2timestamp(). |
|
Returns the index of the month (starting at 0, so the returned value is between 0 and 11). The first month (index 0) is 'january'.
Definition at line 192 of file date.c. References months. Referenced by date2timestamp(). |
|
Format a TSM date (ex: "Tue Sep 17 11:48:39 MET 2002") from a given timestamp.
Definition at line 667 of file date.c. References current_tz, days, MAX_TSM_DATE_SIZE, months, tzname, and TZSET_MAX_SIZE. |
|
Return the number of seconds since 00:00:00 UTC, January 1, 1970.
|
|
Load time zones definitions.
Definition at line 84 of file date.c. References dateyyin, dateyylex(), tz_tab::entry_number, TIME_ZONES_CAN_NOT_OPEN_FILE, TIME_ZONES_LOAD_OK, TIME_ZONES_NO_DEF_FOUND, TIME_ZONES_NO_FILE, and tzs. |
|
Returns a zero terminated string of characters that represents the time zones configuration.
Definition at line 207 of file date.c. References DAYLIGHT_SIZE, tz_tab::entry_number, TIMEZONE_SIZE, TTREF_MAX_TIMESTAMP_SIZE, tz_tab::tz, and tzs. |
|
Set the local time zone to GTM (which is equivalent to UTC).
Definition at line 54 of file date.c. References current_tz, and TZSET_MAX_SIZE. |
|
Check the time zone configuration data against well known couple (date, timestamps).
Definition at line 556 of file date.c. References AUTOMATIC_TIME_SHIFT_COMPUTATION, current_tz, date2timestamp(), timezones::daylight, ttref_tab::entry_number, timezones::shift, string2time_t(), timezones::timezone, ttref_tab::ttref, TTREF_CAN_NOT_OPEN_CONF_FILE, TTREF_INVALID_DATE, TTREF_KO, TTREF_MAX_DATE_SIZE, TTREF_MAX_TIMESTAMP_SIZE, TTREF_OK, ttrefin, ttreflex(), ttrefs, and TZ_AUTOCONF_OFF. |
|
Compare 2 timezone structures.
Definition at line 120 of file date.c. References timezones::daylight, and timezones::timezone. Referenced by tzfound(). |
|
Find a time zone data structure in the time zone configuration file.
Definition at line 136 of file date.c. References current_tz, tz_tab::entry_number, timezones::shift, tz_tab::tz, tzcmp(), and tzs. Referenced by date2timestamp(). |