[SOLVED] NodeTypes DateTime store time as UTC

Hey guys,

in my NodeTypes I have an DateTime Picker. In the database the datetime stored as UTC. If I render the date with fluid like
<f:format.date format=“d.m.Y, H:i”>{node.properties.dateTime.date}</f:format.date>
I get the time I have choosed in the Inspectors DateTimePicker, but with 2 hours offset. :frowning:

I need the time in GMT.
How could I do this?

Thx.

Hi @patriceckhart

Two questions:

  1. What is your date.timezone setting in your php.ini?
  2. What if you use the DateViewHelper like {node.properties.dateTime.date -> f:format.date(format : 'set you format here')} instead of printing properties directly from the object.

If you already got it solved, please share the soution here :slight_smile:

Have a great day,

Soren

Okay, thank you. In my database the Date is stored as UTC, but the cronjobs and the Frontend (online/offline) uses the Europe Setting. It is okay for me.

The date stored and rendered is based on the date.timezone setting you have in PHP.ini. That’s why the date saved in the databsae is being parsed through a \DateTime object - it takes that setting into concern.

Have fun working with Neos :slight_smile: