Same problem as #279051: pgsql named time zone detection is incorrect and #323930: db_tz_support doesn't check Postgresql correctly
- db_tz_support() test is invalid:
$test = db_result(db_query("'2008-02-15 12:00:00 UTC' AT TIME ZONE 'US/Central'"));Should be:
$test = db_result(db_query("SELECT '2008-02-15 12:00:00 UTC' AT TIME ZONE 'US/Central'")); - After making #1 fix above, exposes this bug in sql_tz()
return "TIMESTAMP WITH TIME ZONE $field AT TIME ZONE $localzone"; ?>Is not valid (at least in postgres 8.1.11), since that syntax seems to work only with literals. This should be:
return "$field::timestamp with time zone AT TIME ZONE $localzone";
Patch attached.
| Comment | File | Size | Author |
|---|---|---|---|
| date_api_sql.patch | 824 bytes | divinehawk |
Comments
Comment #1
divinehawk commentedComment #2
suzanne.aldrich commentedHaving the same issue with date-6.x-2.4. Applied patch. Issue solved. Time to roll this puppy in.
Comment #3
karens commentedCommitted. Thanks!