Skip to content

Latest commit

 

History

History
31 lines (21 loc) · 888 Bytes

File metadata and controls

31 lines (21 loc) · 888 Bytes

GST Library TimeZone

Helper for building TimeZone

Use zoneinfo claim of User attributes for mapping UTC datetime to the user TimeZone.

You can use the services ITimeZoneHelper in your own.

Install

Like all Nuget package: Install-Package GST.Library.TimeZone

How to use it

In the Startup file, You have to add the code bellow :

public void ConfigureServices(IServiceCollection services)
{
//...
 services.AddTimeZoneService();
 services.AddMvc(option => option.UseDateTimeProvider(services))
                        .AddJsonOptions(jsonOption =>
                            jsonOption.UseDateTimeConverter(services));
//...
}

Sources