Github user chemikadze commented on a diff in the pull request:
https://github.com/apache/incubator-griffin/pull/435#discussion_r224622499
--- Diff: ui/angular/src/app/job/create-job/batch/batch.component.ts ---
@@ -134,8 +134,8 @@ export class BatchComponent implements OnInit,
AfterViewChecked {
return false;
}
this.measureid = this.getMeasureId();
- let time = new Date().getTimezoneOffset() / 60;
- let timezone = "GMT" + time + ":00";
+ let time = -(new Date().getTimezoneOffset() / 60);
--- End diff --
Looks like there big bunch of different techniques, half of them is based
on regex and way browser formats date, another half requires third-party
libraries. Apparently, `getTimeZoneOffset()` is "accepted answer" over here:
https://stackoverflow.com/questions/1091372/getting-the-clients-timezone-in-javascript
---