2006-07-25 05:51:23 +02:00
|
|
|
/*-------------------------------------------------------------------------
|
|
|
|
*
|
|
|
|
* tzparser.h
|
|
|
|
* Timezone offset file parsing definitions.
|
|
|
|
*
|
2010-01-02 17:58:17 +01:00
|
|
|
* Portions Copyright (c) 1996-2010, PostgreSQL Global Development Group
|
2006-07-25 05:51:23 +02:00
|
|
|
* Portions Copyright (c) 1994, Regents of the University of California
|
|
|
|
*
|
2010-01-02 17:58:17 +01:00
|
|
|
* $PostgreSQL: pgsql/src/include/utils/tzparser.h,v 1.6 2010/01/02 16:58:10 momjian Exp $
|
2006-07-25 05:51:23 +02:00
|
|
|
*
|
|
|
|
*-------------------------------------------------------------------------
|
|
|
|
*/
|
|
|
|
#ifndef TZPARSER_H
|
|
|
|
#define TZPARSER_H
|
|
|
|
|
|
|
|
/*
|
|
|
|
* The result of parsing a timezone configuration file is an array of
|
|
|
|
* these structs, in order by abbrev. We export this because datetime.c
|
|
|
|
* needs it.
|
|
|
|
*/
|
|
|
|
typedef struct tzEntry
|
|
|
|
{
|
|
|
|
/* the actual data: TZ abbrev (downcased), offset, DST flag */
|
2006-10-04 02:30:14 +02:00
|
|
|
char *abbrev;
|
|
|
|
int offset; /* in seconds from UTC */
|
|
|
|
bool is_dst;
|
2006-07-25 05:51:23 +02:00
|
|
|
/* source information (for error messages) */
|
2006-10-04 02:30:14 +02:00
|
|
|
int lineno;
|
2006-07-25 05:51:23 +02:00
|
|
|
const char *filename;
|
|
|
|
} tzEntry;
|
|
|
|
|
|
|
|
|
|
|
|
extern bool load_tzoffsets(const char *filename, bool doit, int elevel);
|
|
|
|
|
2006-10-04 02:30:14 +02:00
|
|
|
#endif /* TZPARSER_H */
|