Ticket #1464 (closed enhancement: fixed)

Opened 10 months ago

Last modified 9 months ago

PostgreSQL timestampz support missing

Reported by: enrico Owned by: jwage
Priority: minor Milestone: 1.0.4
Component: Validators Version: 1.0.3
Severity: Keywords:
Cc: Has Test: no
Status: Pending User Response Has Patch: no

Description

Hello,

we use timestampz instead of timestamp in our PostgreSQL database. If I try to save the model i'll get a validation exception caused by the timestamp column.

Timestamp

2004-10-14 11:51:17

Timestampz

2004-10-14 11:51:17.621832+02

I guess the problem is based in Validator/Timestamp.php caused by the regular expression:

if ( ! preg_match('/^ *[0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}:[0-9]{2} *$/', $value)) {
    return false;
}

Change History

Changed 9 months ago by jwage

  • version changed from 1.0.0 to 1.0.3
  • milestone changed from 1.1.0 to 1.0.4

Changed 9 months ago by jwage

  • status changed from new to closed
  • resolution set to fixed

(In [5086]) [1.0, 1.1] fixes #1464 fixes issue with postgres timestampz and the date validators

Note: See TracTickets for help on using tickets.