+1-888-365-2779
Try Now
More in this section

Forums / Developing with Sitefinity / Event start time when daylight savings changes between now an start date but in same timezone.

Event start time when daylight savings changes between now an start date but in same timezone.

2 posts, 0 answered
  1. Sam
    Sam avatar
    5 posts
    Registered:
    24 Jun 2008
    05 Feb
    Link to this post

    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


  2. Svetoslav Manchev
    Svetoslav Manchev avatar
    735 posts
    Registered:
    22 Sep 2016
    11 Feb
    Link to this post
    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() %>' />
    seems works fine on the backend and on the frontend too. I created 2 events starting and ending on one and the same time for tomorrow and in two months. Both shows one and the same time.

    What is the time displayed on the frontend, if you create the same event for tomorrow?

    Regards,
    Svetoslav Manchev
    Telerik
     
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Sitefinity CMS Ideas&Feedback Portal and vote to affect the priority of the items
     
2 posts, 0 answered