symphonycms/symphony-2 — Issue #923: DateTimeObj should validate timestamps too.
Author: alpacaaa
Created: 2011-12-01 14:08:49+00:00
State: open

I'm aware date time handling in php is a mess, so please bear with me if what I'm gonna say makes little sense :)

Currently, you cannot use timestamps when filtering a Date field because `DateTimeObj::validate` won't validate them. However, `DateTimeObj::get` is perfectly able to handle timestamps so I *think* it's just a matter of making them validate.

Found a little snippet on [stackoverflow](http://stackoverflow.com/a/2524710) which checks if a string is a timestamp:

( is_numeric($stamp) && (int)$stamp == $stamp )

Sounds easy and straightforward, but maybe there is a reason why timestamps aren't allowed.