A simple .NET library to provide a consistent list of time zones with Id, Name, and Offset across all platforms.
TimeZoneInfo provides timezones that are available for a particular system, but that list can vary from system to system. This library provides consistent timezone data across Windows, Linux, and macOS platforms.
dotnet add package TimezonerOr via Package Manager:
Install-Package Timezoner- ✅ Consistent timezone data across all platforms (Windows, Linux, macOS)
- ✅ Simple and lightweight
- ✅ Provides timezone Id, Name, and Offset
- ✅ Built for .NET 10.0
- ✅ Zero dependencies
GetTimezones()- Returns a list of all available timezonesGetTimezoneById(string id)- Returns a specific timezone by its IdGetOffsetAsTimeSpan(string id)- Returns the UTC offset for a timezone by its IdGetOffsetAsTimeSpan(Timezone zone)- Returns the UTC offset for a timezone object
// Get all timezones
var timezones = Timezoner.GetTimezones();
// Get a specific timezone by Id
var timezone = Timezoner.GetTimezoneById("Eastern Standard Time");
// Get offset as TimeSpan by Id
var offset = Timezoner.GetOffsetAsTimeSpan("Eastern Standard Time");
// Get offset as TimeSpan from Timezone object
var offset = Timezoner.GetOffsetAsTimeSpan(timezone);See Timezoner in action: Live Demo
The demo is a Blazor WebAssembly app, but the library can be used in any .NET application (Console, Web API, Desktop, etc.).
Note: The demo site currently runs on .NET 9 and references Timezoner v1.7.1 until Azure Static Web Apps natively supports .NET 10 in their build pipeline. We prefer to wait for official support rather than implement workarounds.
- Latest version (2.x): .NET 10.0 or later
- Previous versions (1.x): .NET 8.0 and .NET 9.0 (available on NuGet)
Contributions are welcome! Please feel free to submit a Pull Request.
Copyright (c) 2025 Dahln Farnes - MIT License