mirror of
https://github.com/postgres/postgres.git
synced 2025-09-02 04:21:28 +03:00
From: Thomas Lockhart <Thomas.G.Lockhart@jpl.nasa.gov>
Subject: Re: [HACKERS] abstime "now" broken Yes, I broke 'now' :( with an attempt at a bug fix involving servers running in the UTC/GMT timezone. These patches fix the problem, and have been tested in GMT (+00 hours), PST (-08), and NZT (+12) timezones which exercized the code for various cases including across day boundaries. btw, this code fixes the same type of problem for 'today', 'yesterday', 'tomorrow', for DATETIME, ABSTIME, DATE and TIME types. The bugfix itself is quite small, but I have accumulated other changes in the datetime data type and include them here also. One set of changes involves printing ISO-formatted dates and is in response to the helpful information from Kurt Lidl regarding ANSI SQL dates. I'll send another e-mail sometime soon discussing more issues he has raised...
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
*
|
||||
* Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* $Id: dt.h,v 1.3 1997/03/25 08:11:18 scrappy Exp $
|
||||
* $Id: dt.h,v 1.4 1997/03/28 07:13:21 scrappy Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -306,8 +306,8 @@ extern int DecodeDateDelta( char *field[], int ftype[],
|
||||
extern int DecodeUnits(int field, char *lowtoken, int *val);
|
||||
|
||||
extern int EncodeSpecialDateTime(DateTime dt, char *str);
|
||||
extern int EncodePostgresDate(struct tm *tm, double fsec, char *str);
|
||||
extern int EncodePostgresSpan(struct tm *tm, double fsec, char *str);
|
||||
extern int EncodeDateTime(struct tm *tm, double fsec, int style, char *str);
|
||||
extern int EncodeTimeSpan(struct tm *tm, double fsec, int style, char *str);
|
||||
|
||||
extern datetkn *datebsearch(char *key, datetkn *base, unsigned int nel);
|
||||
|
||||
|
Reference in New Issue
Block a user