Skip to content
Permalink
Browse files

fix timezone issue for dates coming from pikaday, which are not takin…

…g wintertime into account somehow. relates to #134
  • Loading branch information...
dannyvankooten committed Oct 30, 2018
1 parent 69870d6 commit 17577d852ba7f7beb30d753e0e5eddaf51dcb138
Showing with 2 additions and 3 deletions.
  1. +2 −3 assets/src/js/components/DatePicker.js
@@ -116,9 +116,8 @@ class DatePicker extends Component {

// create unix timestamps from local date objects
let before, after;
const timezoneOffset = (new Date()).getTimezoneOffset() * 60;
before = Math.round((+endDate) / 1000) - timezoneOffset;
after = Math.round((+startDate) / 1000) - timezoneOffset;
before = Math.round((+endDate) / 1000) - endDate.getTimezoneOffset() * 60;
after = Math.round((+startDate) / 1000) - startDate.getTimezoneOffset() * 60;

this.setState({
period: period || '',

0 comments on commit 17577d8

Please sign in to comment.
You can’t perform that action at this time.