Timezone for London

I am trying to use a single Time zone for a given city e.g. London, so I can run a task always at a given London time regardless of Daylight Saving.

So, in short

task can run 4pm London time in winter and summer.

I used Central Standard Time for setting a task for New York but I can see that my task is running an hour later since New York Daylight Saving has started a week back.

Does anyone know if such single TimeZones exist for .Net which represent local time for a city?

I dont want to use BST and GMT as I will need to configure it twice.

Hopefully my question makes sense.

5

1 Answer

The Windows time zone ID for London is "GMT Standard Time". Yes, the name is confusing, but it does indeed correctly represent GMT and BST as used in the UK, and the transitions between them.

However, If you are running .NET Core on a non-Windows OS, then you will need to use the IANA time zone ID of "Europe/London" instead.

Both of these work with the TimeZoneInfo.FindSystemTimeZoneById method, on their respective operating systems.

Lastly, if you are designing your code to be cross-platform, you may wish to use my TimeZoneConverter library, which will allow you to use either form of identifier on any platform.

7

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like