Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/jsakamoto/Toolbelt.Blazor.TimeZoneKit

Provides system time zones set, and local time zone initialization, for Blazor (client-side) browser application.
https://github.com/jsakamoto/Toolbelt.Blazor.TimeZoneKit

blazor mono timezone

Last synced: 3 months ago
JSON representation

Provides system time zones set, and local time zone initialization, for Blazor (client-side) browser application.

Awesome Lists containing this project

README

        

# Blazor WebAssembly App (client-side) Time Zone Kit [![NuGet Package](https://img.shields.io/nuget/v/Toolbelt.Blazor.TimeZoneKit.svg)](https://www.nuget.org/packages/Toolbelt.Blazor.TimeZoneKit/)

## Summary

This is a class library as a NuGet package for [Blazor WebAssembly (client-side)](https://blazor.net/) browser application.

This package provides system time zones set, and local time zone initialization, for [Blazor WebAssembly (client-side)](https://blazor.net/) browser application.

![fig. 1](https://raw.githubusercontent.com/jsakamoto/Toolbelt.Blazor.TimeZoneKit/master/.assets/fig-1-mini.png)

### Note

At this time, the latest version of the client-side Blazor WebAssembly app is v.3.2 Preview 4, it doesn't contain any time zone info, and local time zone is always UTC wherever.

See also:

- [Blazor Issue #663 - TimeZone issues related to Mono?](https://github.com/aspnet/Blazor/issues/663)
- [Blazor Issue #1166 - DateTime always displays as UTC](https://github.com/aspnet/Blazor/issues/1166)
- [Mono Issue #6368 - WebAssembly: Missing Timezone implementation](https://github.com/mono/mono/issues/6368)

## Supported Blazor versions

"Blazor WebAssembly App (client-side) Time Zone Kit" ver.7.x supports Blazor WebAssembly App versions **3.2 Preview 2~4.**

## How to install and use it?

**Step.1** - Install this package.

```shell
> dotnet add package Toolbelt.Blazor.TimeZoneKit
```

**Step.2** - Add calling `UseLocalTimeZone()` extension method in `Main()` method in your "Program.cs".

```csharp
...
using Toolbelt.Blazor.Extensions.DependencyInjection; //