diff options
| author | Tom Lane | 2001-05-03 22:53:07 +0000 |
|---|---|---|
| committer | Tom Lane | 2001-05-03 22:53:07 +0000 |
| commit | f5ba72ea04e71a127031a4436781943008abfa7a (patch) | |
| tree | 0da4f624a81d6f9d241a0e88fb4bc96fd9b46f2c /src/include | |
| parent | 0cec2bb0cd2ea1a19d2ad58107b04226de401d44 (diff) | |
Consolidate several near-identical uses of mktime() into a single
routine DetermineLocalTimeZone(). In that routine, be more wary of
broken mktime() implementations than the original code was: don't allow
mktime to change the already-set y/m/d/h/m/s information, and don't
use tm_gmtoff if mktime failed. Possibly this will resolve some of
the complaints we've been hearing from users of Middle Eastern timezones
on RedHat.
Diffstat (limited to 'src/include')
| -rw-r--r-- | src/include/utils/datetime.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/include/utils/datetime.h b/src/include/utils/datetime.h index af9b7f6ac7..5922d635dc 100644 --- a/src/include/utils/datetime.h +++ b/src/include/utils/datetime.h @@ -9,7 +9,7 @@ * Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $Id: datetime.h,v 1.17 2001/01/24 19:43:28 momjian Exp $ + * $Id: datetime.h,v 1.18 2001/05/03 22:53:07 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -255,6 +255,8 @@ extern int DecodeDateDelta(char **field, int *ftype, int nf, int *dtype, struct tm * tm, double *fsec); +extern int DetermineLocalTimeZone(struct tm * tm); + extern int EncodeDateOnly(struct tm * tm, int style, char *str); extern int EncodeTimeOnly(struct tm * tm, double fsec, int *tzp, int style, char *str); extern int EncodeDateTime(struct tm * tm, double fsec, int *tzp, char **tzn, int style, char *str); |
