Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Impossible to use MySQL's non-NULL Datetime #103

Closed
coviex opened this Issue · 1 comment

2 participants

@coviex

Hi,

MySQL table has:

`done_at` datetime NOT NULL

AFAIK in Propel Datetime maps to timestamp.
So schema.yml has:

done_at: { type: timestamp }

Result is:

  DateTime::__construct(): Failed to parse time string (0) at position 0 (0): Unexpected character 

when I try to setDoneAt() on model with empty ('0000-00-00 00:00:00') property.
Error seems to be in setDoneAt() in line:

$currentDateAsString = ($this->checked_at !== null && $tmpDt = new DateTime($this->checked_at)) ? $tmpDt->format('Y-m-d H:i:s') : null;

Cheers

@willdurand
Owner

Seems close to Propel. You should open this issue in the Propel repository itself.

@willdurand willdurand closed this
@hd-deman hd-deman referenced this issue from a commit in hd-deman/sfPropelORMPlugin
@willdurand willdurand Added missing declared class. Refs #103. 77a166c
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.