I have a datepicker in my site which formats the time in the current locale. So the time gets sent to the server in
The locale on the frontend is determined by
Now how can I convert this date to a database-friendly datetime (
YYYY-MM-DD) or at least to a timestamp of some sort?
So basically I'm looking for a clean generic approach on how to convert a localized date to a timestamp.
I've tried all kind of things but none seemed to work.