mirror of https://github.com/status-im/fathom.git
fix timezone issue for dates coming from pikaday, which are not taking wintertime into account somehow. relates to #134
This commit is contained in:
parent
69870d6fa8
commit
17577d852b
|
@ -116,9 +116,8 @@ class DatePicker extends Component {
|
||||||
|
|
||||||
// create unix timestamps from local date objects
|
// create unix timestamps from local date objects
|
||||||
let before, after;
|
let before, after;
|
||||||
const timezoneOffset = (new Date()).getTimezoneOffset() * 60;
|
before = Math.round((+endDate) / 1000) - endDate.getTimezoneOffset() * 60;
|
||||||
before = Math.round((+endDate) / 1000) - timezoneOffset;
|
after = Math.round((+startDate) / 1000) - startDate.getTimezoneOffset() * 60;
|
||||||
after = Math.round((+startDate) / 1000) - timezoneOffset;
|
|
||||||
|
|
||||||
this.setState({
|
this.setState({
|
||||||
period: period || '',
|
period: period || '',
|
||||||
|
|
Loading…
Reference in New Issue