I have a table that tracks dates as a “timestamp with timezone” data type (This is Postgres 9.3). If I pass a timestamp without TZ data attached, the validator says it’s grand and creates the entity. If I pass a time stamp with a timezone, though, the validator fails, no entity is created, and my DB has a sad.
Example
This works
{
"id":"1475881942413",
"job_id":"19",
"user_id":"26",
"venue_id":2,
"start_date":"2017-02-21 08:10",
"end_date":"2017-02-21 08:15"
}
But this does not
{
"id":"1475881942413",
"job_id":"19",
"user_id":"26",
"venue_id":2,
"start_date":"2017-02-21 08:10-0800",
"end_date":"2017-02-21 08:15-0800"
}
I’ve worked around this by simply turning the validation off, but being the paranoid type, I’d like to be able to turn it back on again.
Is that expected behavior, or a failure in the validator?