Event start time when daylight savings changes between now an start date but in same timezone.
Hi all, something I am trying wrap my head around.
My time zone is (UTC) Dublin, Edinburgh, Lisbon, London.
Lets say actually in London, so I am currently UTC.
At the end of March I will move to British Summer Time (UTC+1) for daylight savings.
I have an event that starts on 10th June at 11:00AM that I enter now, I set its time zone to (UTC) Dublin, Edinburgh, Lisbon, London. It is created in the database as 10:00.
This is fine as at that time the event is UTC+1 so it makes sense its UTC time is 10:00.
The thing that looks a bit weird to me is that now when I am on the front end and I look at this event it tells me it will start at 10:00 because I am currently UTC, but when the event actually starts my time zone will be UTC+1 so as I view the page the start time will change at the end of March.
This just feels strange to me that if me and the event are in the same timezone with respect to daylight savings then I should just see the UTC+1 start time of 11:00AM because if I am going to or participating in that event my local time will be 11AM
I am using SystemExtensions.ToSitefinityUITime((DateTime)Eval("EventStart"))
Has anyone else dealt with this? Or have I missed something.
Sam
Hi Sam,
You are correct that the date-time is saved in the database in UTC. Can you share more information about the steps performed in order to display the Event details and the Sitefinity version used?
Testing the default Event widget on version 8.2- including the automatically generated code:
START: <
sitefinity:TextField
runat
=
"server"
DisplayMode
=
"Read"
Value='<%# ((bool)Eval("AllDayEvent")) ? ((DateTime)Eval("EventStart")) : ((DateTime)Eval("EventStart")).ToSitefinityUITime() %>' />
END: <
sitefinity:TextField
runat
=
"server"
DisplayMode
=
"Read"
Value='<%# ((bool)Eval("AllDayEvent")) ? ((DateTime)Eval("EventEnd")) : ((DateTime)Eval("EventEnd")).ToSitefinityUITime() %>' />