codekingpro/portable-devtools
116k
1/*-------------------------------------------------------------------------2 *3 * tzparser.h4 * Timezone offset file parsing definitions.5 *6 * Portions Copyright (c) 1996-2023, PostgreSQL Global Development Group7 * Portions Copyright (c) 1994, Regents of the University of California8 *9 * src/include/utils/tzparser.h10 *11 *-------------------------------------------------------------------------12 */13#ifndef TZPARSER_H14#define TZPARSER_H15 16#include "utils/datetime.h"17 18/*19 * The result of parsing a timezone configuration file is an array of20 * these structs, in order by abbrev. We export this because datetime.c21 * needs it.22 */23typedef struct tzEntry24{25 /* the actual data */26 char *abbrev; /* TZ abbreviation (downcased) */27 char *zone; /* zone name if dynamic abbrev, else NULL */28 /* for a dynamic abbreviation, offset/is_dst are not used */29 int offset; /* offset in seconds from UTC */30 bool is_dst; /* true if a DST abbreviation */31 /* source information (for error messages) */32 int lineno;33 const char *filename;34} tzEntry;35 36 37extern TimeZoneAbbrevTable *load_tzoffsets(const char *filename);38 39#endif /* TZPARSER_H */40 