Added TimeZone Functionality

This commit is contained in:
t.ruspekhofer 2022-03-10 22:34:47 +01:00
parent c298f4d20e
commit c215ed058f
9 changed files with 129 additions and 48 deletions

View file

@ -7,3 +7,14 @@
@(await Html.RenderComponentAsync<App>(RenderMode.Server))
<!--<component type="typeof(App)" render-mode="ServerPrerendered" />-->
<script>
function GetTimezoneValue() {
// Returns the time difference in minutes between UTC time and local time.
return new Date().getTimezoneOffset();
}
</script>
<script>
function GetTimezone() {
return new Intl.DateTimeFormat().resolvedOptions().timeZone;
}
</script>