reworked GetTimeZoneValue to ust the date to determine daylight saving times

This commit is contained in:
t.ruspekhofer 2022-03-12 23:00:37 +01:00
parent 35a1ff111b
commit 2cf4018e33
2 changed files with 9 additions and 17 deletions

View file

@ -8,9 +8,10 @@
@(await Html.RenderComponentAsync<App>(RenderMode.Server))
<!--<component type="typeof(App)" render-mode="ServerPrerendered" />-->
<script>
function GetTimezoneValue() {
function GetTimezoneValue(dateTime) {
// Returns the time difference in minutes between UTC time and local time.
return new Date().getTimezoneOffset();
date = new Date(dateTime);
return date.getTimezoneOffset();
}
</script>
<script>