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:
@ -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)
|
||||
|
Reference in New Issue
Block a user