Postgres 8.4 Time 24Hs vs 12Hs

Bug #420618 reported by Carla
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
ProsePoint
New
Undecided
Unassigned

Bug Description

I have installed postgres 8.4 on Centos5. Every page I try to access, I get this error.

# warning: pg_query() [function.pg-query]: Query failed: ERROR: hour "0" is invalid for the 12-hour clock HINT: Use the 24-hour clock, or give an hour between 1 and 12. in /.../includes/database.pgsql.inc on line 139.

# user warning: query: SELECT node.nid AS nid, node.title AS node_title, node_data_field_schedule.field_eid_value AS node_data_field_schedule_field_eid_value, node.type AS node_type, node.vid AS node_vid, node_data_field_schedule.field_schedule_value AS node_data_field_schedule_field_schedule_value, node.nid AS node_nid FROM (SELECT DISTINCT ON (nid) * FROM node) node LEFT JOIN content_type_edition node_data_field_schedule ON node.vid = node_data_field_schedule.vid WHERE ((node.status <> 0) AND (node.type in ('edition')) AND (node_data_field_schedule.field_channel_value = 1)) AND (TO_CHAR(TO_DATE(node_data_field_schedule.field_schedule_value, 'FMYYYY-FMMM-FMDDTFMHH:FMMI:FMSS'), 'YYYY-MM-DD"T"HH24') <= '2009-08-28T12') ORDER BY node_data_field_schedule_field_schedule_value DESC, node_nid DESC LIMIT 10 OFFSET 0 in /.../profiles/prosepoint/modules/views/includes/view.inc on line 755

Revision history for this message
Carla (carla-ares) wrote :

Problem solved with replacing line profiles/prosepoint/modules/date/date_api_sql.inc:194
From:
$field = "TO_DATE($field, 'FMYYYY-FMMM-FMDDTFMHH:FMMI:FMSS')";
To:
$field = "TO_DATE($field, 'FMYYYY-FMMM-FMDDTFMHH24:FMMI:FMSS')";

I'm using ProsePoint 0.25

Revision history for this message
bengtan (bengtan) wrote :

Hi,

I don't know much about using Postgres, but I have filed a bug report with the upstream component.

See http://drupal.org/node/565830.

Hopefully it's a straightforward issue and it'll be fixed soon.

Thank you.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.