gooderp18绿色标准版
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

40 lines
1.1KB

  1. /*-------------------------------------------------------------------------
  2. *
  3. * tzparser.h
  4. * Timezone offset file parsing definitions.
  5. *
  6. * Portions Copyright (c) 1996-2019, PostgreSQL Global Development Group
  7. * Portions Copyright (c) 1994, Regents of the University of California
  8. *
  9. * src/include/utils/tzparser.h
  10. *
  11. *-------------------------------------------------------------------------
  12. */
  13. #ifndef TZPARSER_H
  14. #define TZPARSER_H
  15. #include "utils/datetime.h"
  16. /*
  17. * The result of parsing a timezone configuration file is an array of
  18. * these structs, in order by abbrev. We export this because datetime.c
  19. * needs it.
  20. */
  21. typedef struct tzEntry
  22. {
  23. /* the actual data */
  24. char *abbrev; /* TZ abbreviation (downcased) */
  25. char *zone; /* zone name if dynamic abbrev, else NULL */
  26. /* for a dynamic abbreviation, offset/is_dst are not used */
  27. int offset; /* offset in seconds from UTC */
  28. bool is_dst; /* true if a DST abbreviation */
  29. /* source information (for error messages) */
  30. int lineno;
  31. const char *filename;
  32. } tzEntry;
  33. extern TimeZoneAbbrevTable *load_tzoffsets(const char *filename);
  34. #endif /* TZPARSER_H */
上海开阖软件有限公司 沪ICP备12045867号-1