mirror of
https://github.com/postgres/postgres.git
synced 2025-08-19 23:22:23 +03:00
Andrew pointed out that the current fix didn't handle dates that were
near daylight savings time boudaries. This handles it properly, e.g.
test=> select '2005-04-03 04:00:00'::timestamp at time zone
'America/Los_Angeles';
timezone
------------------------
2005-04-03 07:00:00-04
(1 row)
This commit is contained in:
@@ -10,7 +10,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $PostgreSQL: pgsql/src/backend/utils/adt/nabstime.c,v 1.141 2005/07/22 19:55:50 tgl Exp $
|
||||
* $PostgreSQL: pgsql/src/backend/utils/adt/nabstime.c,v 1.142 2005/07/23 14:25:33 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -474,7 +474,7 @@ timestamp_abstime(PG_FUNCTION_ARGS)
|
||||
result = NOEND_ABSTIME;
|
||||
else if (timestamp2tm(timestamp, NULL, tm, &fsec, NULL, NULL) == 0)
|
||||
{
|
||||
tz = DetermineLocalTimeZone(tm);
|
||||
tz = DetermineTimeZoneOffset(tm, global_timezone);
|
||||
result = tm2abstime(tm, tz);
|
||||
}
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user