I've had this issue every time I've tried to play with calendarfield and dates in Seblod. And I find no solution to it. Feeling a bit frustrated about it :P
I've created a app that is to list events. In these events we need a start date and time. For this I use the calendar field.
In this field I've set a date and time: 28.02.2017 14:00
When I edit the content, this same time and date is shown in the field. When I check the database storage, the same date and time is shown as stored in the database.
But when I try to get this date echo'ed in a custom template, it shows the correct date but wrong hour. Now it shows me 04:00 instead of 14:00.
I've solved this before by using some code to add the hours needed for it to show correct. But that only works until you swtich to daylighs savings time etc. And then it's of by one hour unless i hardcode a change in the template.
Why cant it just echo the correct hour as stored in the database? I can't understand why I always get this problem.
The date is correct in content view, with custom templateing. But in list view it's not working as it should. There not only the time is off, but also the date when I look more into it. I'm using the list template when this error is prominent. When I combine list with another item template it is again correct.
Dates and hours are stored in UTC time, which is usually different than your local time. When you save and display date it is converted from local time to UTC and back. When you echo calendar field in custom template or override you should use text property, not value (value is in UTC, text should be converted).