[Neos] Neos DateTime handling
dfeyer at ttree.ch
Tue Mar 18 22:11:53 CET 2014
Intersting discussion on this topic on StackOverflow:
For my point of view, timezone is a user parameter (user preference or auto detection is an other story), but always storing in UTC make a lots of sense.
My two cents ;)
Sent with Airmail
Le 18 mars 2014 à 21:30:04, Rens Admiraal (rens.admiraal at typo3.org) a écrit:
Today I played around with the datepicker so see how the time / datetime
capabilities work. It seems to work pretty awesome, you can for example
create a timepicker by using the following config:
label: 'Some Time'
Or date + time picker by using:
label: 'Some Date with Time'
format: 'dd-mm-yyyy h:ii'
As you can see, just setting the format is enough. *BUT* we do have an
issue here. As the original datepicker did only support dates we
hardcoded the transfer format between the client and server in:
'yyyy-mm-dd'. This is done in the DateTimeEditor (js),
ContentElementWrappingService (Neos) and NodeConverter (CR). This causes
the time information to get lost on storage, so we need to fix that in
I played around with the code and come up with:
I tried to use the \DateTime::ISO8601 constant, but that one adds an
offset which causes troubles on the client side at the moment. So I used
the ISO8601 format without offset.
But before digging too deep it might make sense to step back a little
and decide how we want to handle timezone differences between server and
client and so on.
Do you have any thoughts on that?
Neos mailing list
Neos at lists.typo3.org
More information about the Neos