Skip to content

A simple library to provide a list of time zones, providing an Id, Name, and Offset

License

Notifications You must be signed in to change notification settings

dahln/Timezoner

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

.NET CI/CD Nuget Azure Static Web Apps CI/CD

Timezoner

A simple library to provide a list of time zones, providing an Id, Name, and Offset.

Demo

See the TimeZoner in action: https://zealous-island-09cfe4010.azurestaticapps.net/. The demo is a Blazor app, but the libraries can be used in other 'non-web' applications as well.

Why this project exists: TimeZoneInfo provides timezones that are available for a particular system. That list could change from system to system. I noticed a difference in the lists when getting timezones in a Windows environment and a Linux environment. Thanks to the ability of .NET Core to run on multiple platforms, I created this library to provide my applications consitent timezone data across platforms.

Methods:

  • GetTimezones()
  • GetTimezoneById(string id)
  • GetOffsetAsTimeSpan(string id)
  • GetOffsetAsTimeSpan(Timezone zone)

Timezoner is available on Nuget: https://www.nuget.org/packages/Timezoner/

About

A simple library to provide a list of time zones, providing an Id, Name, and Offset

Topics

Resources

License

Stars

Watchers

Forks

Languages