diff --git a/date_api/date_api_sql.inc b/date_api/date_api_sql.inc index a95ca4e..4dff56a 100644 --- a/date_api/date_api_sql.inc +++ b/date_api/date_api_sql.inc @@ -113,10 +113,13 @@ class date_sql_handler { break; case 'pgsql': - $test = db_query("SELECT '2008-02-15 12:00:00 UTC' AT TIME ZONE 'US/Central'")->fetchField(); - if ($test == '2008-02-15 06:00:00') { - $has_support = TRUE; + try { + $test = db_query("SELECT '2008-02-15 12:00:00 UTC' AT TIME ZONE 'US/Central'")->fetchField(); + if ($test == '2008-02-15 06:00:00') { + $has_support = TRUE; + } } + catch( PDOException $e ) { /* no support */ } break; } variable_set('date_db_tz_support', $has_support);