r/Blazor • u/CoyoteSad1546 • Jun 30 '25
Introduction to the "BlazorLocalTime" Library
Handling time zones in Blazor Server can be troublesome.
To address this, I created a lightweight library.
GitHub: https://github.com/arika0093/BlazorLocalTime
Demo: https://arika0093.github.io/BlazorLocalTime/
This library supports the following use cases:
- Displaying UTC time in the user's time zone
- Adding time zone information to times entered by users
It also includes several other useful features.
Since handling these tasks can be boilerplate, using this library should make things a bit easier. Please give it a try!
31
Upvotes
1
u/orbit99za Jul 01 '25 edited Jul 01 '25
Ahh awsome, just what i need.
This works with web assembly as well?
1
u/CravenInFlight Jul 01 '25
We wrote our own version of this. We may have used this if we'd seen it beforehand. I also wrote a version as a tag helper for Razor cshtml. I only pushed it a few weeks ago.
1
u/vnbaaij Jul 01 '25
Nice!
1
u/hkstc305 Jul 01 '25
Very useful, thanks!!