reworked GetTimeZoneValue to ust the date to determine daylight saving times
This commit is contained in:
parent
35a1ff111b
commit
2cf4018e33
2 changed files with 9 additions and 17 deletions
|
@ -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>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue