Windows 10: Unexpected results from time zone conversions

Discus and support Unexpected results from time zone conversions in Windows 10 Customization to solve the problem; I was trying out the time zone conversions in SQL Server 2017 and ran across some unexpected results. The same anomalies show up in PowerShell, since... Discussion in 'Windows 10 Customization' started by R,S, Mar 29, 2019.

  1. R,S
    R,S Win User

    Unexpected results from time zone conversions


    I was trying out the time zone conversions in SQL Server 2017 and ran across some unexpected results. The same anomalies show up in PowerShell, since they are both using the underlying time zone information in Windows.


    Here is a good example in PowerShell:


    $d = Get-Date '2019-10-26 20:30:00 -04:00' -- Eastern Time doesn't fall back to -05:00 until November

    @( [System.TimeZoneInfo]::ConvertTimeBySystemTimeZoneId($d, 'W. Europe Standard Time'), [System.TimeZoneInfo]::ConvertTimeBySystemTimeZoneId($d, 'Central Europe Standard Time'), [System.TimeZoneInfo]::ConvertTimeBySystemTimeZoneId($d, 'E. Europe Standard Time') )



    (There are two lines of code there - the first one starting with "$d" and the second one starting with "@(".)


    Unexpected results from time zone conversions 9e2cfc85-7afa-4c66-ac7a-c4fbd0641221?upload=true.png


    The same example in SQL Server 2017:


    declare @nyTime datetimeoffset = convert(datetimeoffset, N'2019-10-26 20:30:00.000000 -04:00', 121);

    select @nyTime at time zone N'W. Europe Standard Time' [W. Europe Time],
    @nyTime at time zone N'Central Europe Standard Time' [Central Europe Time],
    @nyTime at time zone N'E. Europe Standard Time' [E. Europe Time];

    Unexpected results from time zone conversions 00a19b8b-1126-4d10-ad8b-51d541d0cc4c?upload=true.png


    The result in all three time zones is 2:30 am local time. My understanding is that all of the EU changes to or from Summer time at the same time (through the end of March 2021, at least [end of time changes in EU]), so shouldn't the local time in the adjacent time zones always have offsets that are one hour apart, even on the day that the offsets change?

    The server is running Windows Server 2016 with the February 2019 update KB4487006.

    :)
     
  2. Arul_D Win User

    Event ID 10 - Error in conversion for Time Zone -Windows 10

    Hi,

    I suggest you to follow the below steps to change the settings of time and time zone:

    • Press “Windows+X” and click on “control panel”.
    • On the left hand side click on “clock, language and region”.
    • Click on “change time zone”.
    • And then click on the tab “internet time” and click on
      “change settings”.
    • Check the box “synchronize with an internet time server” and also select the option
      “time.windows.com” from the drop down and click on “ok” and check if the issue persists.
    Hope this information was helpful and do let us know if you need further assistance. We will be glad to assist.
     
    Arul_D, Mar 29, 2019
    #2
  3. Fluctuating Time Zone Setting

    Hi,

    Thank you for posting your query in Microsoft Community. Apologize for the inconvenience caused to you.

    I would suggest you to check if the values for “set time automatically” and “set time zone automatically” under Date and Time settings are “ON”. If not, then suggest you to make the vale to “ON” and check for the status.

    If the issue still persists, follow the steps provided below:

    • Press Windows key + R, type services.msc and press Enter.
    • Locate Windows Time from the list and double click on the service.
    • In Genereal tab, set the Startup type to Automatic.
    • Click on Apply and OK.

    Hope the information is helpful. Feel free to write to us for any other assistance with Windows, we’ll be glad to assist you.
     
    Eeshwar Kumar, Mar 29, 2019
    #3
  4. Unexpected results from time zone conversions

    Time Zones

    Hi,

    Thank you for posting your query in Microsoft Community.

    We would be glad to help you with the issue you are facing today. I understand the difficulty with the problem, it would be helpful if you could reply to these questions to assist you further.

    • What is the make and model of your computer?
    • Since when are you facing this issue?

    Time Zone will not change automatically while you travel. If you want to change the Time Zone for your computer, you will have to change manually.

    Only the live tiles like Weather, News, and Sports have the ability to change with the location.

    • Go to control panel.
    • Click on "Clock, Language, and Region
    • Under "Date and Time", click on "Change the Time Zone"
    • Under "Time Zone" click on "Change time zone
    • Under "Time Zone, click the current time zone, and select your actual time zone
      • Click OK and you are done.

    Hope this helps in resolving the issue. If issue persists, do get back to us. We will be happy to assist you.

    Thank you.
     
    Mohammed AliAli, Mar 29, 2019
    #4
Thema:

Unexpected results from time zone conversions

Loading...
  1. Unexpected results from time zone conversions - Similar Threads - Unexpected results zone

  2. Time Zone

    in Windows 10 Software and Apps
    Time Zone: Windows 11 it will not let me recorrect the time zone and does not sync auto https://answers.microsoft.com/en-us/windows/forum/all/time-zone/b75791ad-16c4-4e0e-9f73-e3393540dfd3
  3. Time Zone

    in Windows 10 Gaming
    Time Zone: Hello, the "Set the time zone automatically" is blanked out. How can it be activated?Tomas https://answers.microsoft.com/en-us/windows/forum/all/time-zone/9b63922a-7a4a-4f9b-99f9-394b7a727372
  4. Time Zone

    in Windows 10 Software and Apps
    Time Zone: Hello, the "Set the time zone automatically" is blanked out. How can it be activated?Tomas https://answers.microsoft.com/en-us/windows/forum/all/time-zone/9b63922a-7a4a-4f9b-99f9-394b7a727372
  5. time zone

    in Windows 10 Customization
    time zone: I change the time zone but it keeps going back to the USA one, how do I change it permanently https://answers.microsoft.com/en-us/windows/forum/all/time-zone/157a92f4-489d-454c-b7ef-8e125040dcb2
  6. Time-Zone

    in Windows 10 Customization
    Time-Zone: My time-zone keeps changing back to Pacific Time, but I am located on the Eastern side of the US. This is my PC and I recently built it. https://answers.microsoft.com/en-us/windows/forum/all/time-zone/af486583-80c9-4f1d-9151-5701d8a851ed
  7. Time Zones

    in Windows 10 Customization
    Time Zones: Hi, I recently realized that my computer clock was one hour behind, when I checked the time settings the time zone was central time which is not my time zone but when I changed it to eastern the settings automatically switch back to the central time zone. How can I fix this?...
  8. time zones

    in Windows 10 Customization
    time zones: Why does my computer think Montana is in central time zone? https://answers.microsoft.com/en-us/windows/forum/all/time-zones/05d8f838-8048-45a9-9f26-bcdb1b417317
  9. Time zone

    in Windows 10 Customization
    Time zone: How do I change from Central Time Zone to Eastern Time Zone on my computer? https://answers.microsoft.com/en-us/windows/forum/all/time-zone/8ecb8683-8b71-49d5-a3e4-5bb753cae5ea
  10. Unexpected results while converting time zones using SQL Server 2017 on Windows Server 2016

    in Windows 10 Customization
    Unexpected results while converting time zones using SQL Server 2017 on Windows Server 2016: I was trying out the time zone conversions in SQL Server 2017 and ran across some unexpected results. The same anomalies show up in PowerShell, since they are both using the underlying time zone information in Windows. Here is a good example in PowerShell: $d = Get-Date...