00001 /*------------------------------------------------------------------------- 00002 * 00003 * tzparser.h 00004 * Timezone offset file parsing definitions. 00005 * 00006 * Portions Copyright (c) 1996-2013, PostgreSQL Global Development Group 00007 * Portions Copyright (c) 1994, Regents of the University of California 00008 * 00009 * src/include/utils/tzparser.h 00010 * 00011 *------------------------------------------------------------------------- 00012 */ 00013 #ifndef TZPARSER_H 00014 #define TZPARSER_H 00015 00016 #include "utils/datetime.h" 00017 00018 /* 00019 * The result of parsing a timezone configuration file is an array of 00020 * these structs, in order by abbrev. We export this because datetime.c 00021 * needs it. 00022 */ 00023 typedef struct tzEntry 00024 { 00025 /* the actual data: TZ abbrev (downcased), offset, DST flag */ 00026 char *abbrev; 00027 int offset; /* in seconds from UTC */ 00028 bool is_dst; 00029 /* source information (for error messages) */ 00030 int lineno; 00031 const char *filename; 00032 } tzEntry; 00033 00034 00035 extern TimeZoneAbbrevTable *load_tzoffsets(const char *filename); 00036 00037 #endif /* TZPARSER_H */