1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-31 22:04:40 +03:00

Modify date->timestamp conversion to use mktime().

This should do better than before around Daylight Savings Time
 transitions.
This commit is contained in:
Thomas G. Lockhart
2000-09-12 05:41:37 +00:00
parent 3bb28381d3
commit 4d745dadc9
2 changed files with 31 additions and 102 deletions

View File

@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/adt/datetime.c,v 1.52 2000/07/14 15:33:33 thomas Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/adt/datetime.c,v 1.53 2000/09/12 05:41:37 thomas Exp $
*
*-------------------------------------------------------------------------
*/
@ -2247,8 +2247,8 @@ EncodeTimeSpan(struct tm * tm, double fsec, int style, char *str)
sprintf(cp, "%s%02d:%02d", (is_nonzero ? " " : ""),
abs(tm->tm_hour), abs(tm->tm_min));
cp += strlen(cp);
if ((tm->tm_hour != 0) || (tm->tm_min != 0))
is_nonzero = TRUE;
/* Mark as "non-zero" since the fields are now filled in */
is_nonzero = TRUE;
/* fractional seconds? */
if (fsec != 0)