Event For System Time Changed or Time Zone updated


  • Hi,

    I am working on a windows store app, i want to know two things 

    1) Time zone change

    2) Manually changing System time and date.

    I tried using background task with condition timezone change, but when the task is triggered , the date is not updated it still shows the old date time.

    When in Background task completed event i checked DateTime.Now and TimeZoneInfo. both of them do not show updated time.

    • Edited by Hande123 Wednesday, July 16, 2014 3:34 PM
    Wednesday, July 16, 2014 3:32 PM

All replies

  • According to the documentation:

    TimeZoneChange | timeZoneChange 11

    The background task is triggered when the time zone changes on the device (for example, when the system adjusts the clock for daylight saving time).

    Note  This trigger only fires if the new time zone actually changes the system time.

    I don't think that DateTime.Now is going to change at all - the time didn't change, just the timezone. The TimeZoneInfo might be a problem - do you have a sample app you can show this behavior to me?

    Matt Small - Microsoft Escalation Engineer - Forum Moderator
    If my reply answers your question, please mark this post as answered.

    NOTE: If I ask for code, please provide something that I can drop directly into a project and run (including XAML), or an actual application project. I'm trying to help a lot of people, so I don't have time to figure out weird snippets with undefined objects and unknown namespaces.

    Wednesday, July 16, 2014 7:33 PM