I have a site that uses PostgreSQL. When setting up a date-pager (a component of the date_view module), suddenly my site gets these errors:
PDOException: SQLSTATE[22023]: Invalid parameter value: 7 ERROR: time zone "US/Central" not recognized: SELECT '2008-02-15 12:00:00 UTC' AT TIME ZONE 'US/Central'; Array ( ) in date_sql_handler->db_tz_support() (line 112 of /home/myuser/public_html/sites/all/modules/contrib/date/date_api/date_api_sql.inc).
This site was imported as-is from another installation, on a server where they had already configured Postgres, and this error did NOT occur there, when I set up the date pager following the exact same procedure (create a date contextual filter, then enable paging by date). My new (shared) host is in the "US/Central" timezone, so I suspect this is due to something to do with their Postgres config.
The error is happening at a place in the code where it is doing this: "See if the db has timezone name support." Clearly, in my case, the db does NOT have timezone name support, but this fact is getting clobbered by an exception.
Comment | File | Size | Author |
---|---|---|---|
#5 | date-n2453445-5.patch | 1.02 KB | DamienMcKenna |
| |||
#5 | date-n2453445-5.interdiff.txt | 983 bytes | DamienMcKenna |
#3 | date-pdoexception-2453445-2.patch | 833 bytes | rahul.nahar001 |
| |||
#1 | date-pdoexception-2453445-1.patch | 819 bytes | dan3h |
Comments
Comment #1
dan3h CreditAttribution: dan3h commentedFix attached -- simply adds exception-handling to the test.
Comment #3
rahul.nahar001 CreditAttribution: rahul.nahar001 at TATA Consultancy Services commentedPlease find updated patch file.
Comment #4
DamienMcKennaComment #5
DamienMcKennaRerolled, and I tied up the comments a little.
Comment #6
DamienMcKennaCommitted. Thank you!