Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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.
- Host: GitHub
- URL: https://github.com/jsakamoto/Toolbelt.Blazor.TimeZoneKit
- Owner: jsakamoto
- License: mpl-2.0
- Created: 2018-08-24T13:55:49.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2020-04-24T14:08:09.000Z (over 4 years ago)
- Last Synced: 2024-07-18T23:35:28.261Z (4 months ago)
- Topics: blazor, mono, timezone
- Language: C#
- Homepage:
- Size: 1.09 MB
- Stars: 35
- Watchers: 5
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README-OLD.md
- License: LICENSE
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; //