Timezoner 2.0.0

dotnet add package Timezoner --version 2.0.0
                    
NuGet\Install-Package Timezoner -Version 2.0.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Timezoner" Version="2.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Timezoner" Version="2.0.0" />
                    
Directory.Packages.props
<PackageReference Include="Timezoner" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Timezoner --version 2.0.0
                    
#r "nuget: Timezoner, 2.0.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Timezoner@2.0.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Timezoner&version=2.0.0
                    
Install as a Cake Addin
#tool nuget:?package=Timezoner&version=2.0.0
                    
Install as a Cake Tool

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

Timezoner

A simple .NET library to provide a consistent list of time zones with Id, Name, and Offset across all platforms.

NuGet NuGet Downloads

Why Timezoner?

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.

Installation

dotnet add package Timezoner

Or via Package Manager:

Install-Package Timezoner

Features

  • ✅ 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

Methods

  • GetTimezones() - Returns a list of all available timezones
  • GetTimezoneById(string id) - Returns a specific timezone by its Id
  • GetOffsetAsTimeSpan(string id) - Returns the UTC offset for a timezone by its Id
  • GetOffsetAsTimeSpan(Timezone zone) - Returns the UTC offset for a timezone object

Usage

// 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);

Demo

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.

Requirements

  • Latest version (2.x): .NET 10.0 or later
  • Previous versions (1.x): .NET 8.0 and .NET 9.0 (available on NuGet)

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

Copyright (c) 2025 Dahln Farnes - MIT License

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net10.0

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
2.0.0 284 11/14/2025
1.7.1 312 2/9/2025
1.7.0 297 2/9/2025
1.6.0 313 2/4/2024
1.5.1 367 7/17/2023
1.5.0 411 2/27/2023
1.4.0 853 3/12/2022
1.3.0 3,135 11/25/2021
1.2.0 17,045 10/17/2018
1.0.0 16,650 10/17/2018 1.0.0 is deprecated because it is no longer maintained.

v2.0.0: Upgraded to .NET 10.0 (breaking change - net8.0/net9.0 support removed, use v1.7.1 for previous frameworks). Enhanced NuGet package with README, SourceLink, and symbol packages.