Skip to content

Commit

Permalink
Merge pull request #34 from metaodi/fix-timezone-parsing
Browse files Browse the repository at this point in the history
Make sure dates are parsed as UTC to avoid timezone troubles
  • Loading branch information
metaodi committed Jan 3, 2016
2 parents 5b577a2 + 53a7ac6 commit 0d50838
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
All notable changes to this project will be documented in this file.

## [Unreleased][unreleased]
### Fixed
- Parse all dates as UTC to avoid timezone conversion errors

## 0.11.0 - 2016-01-03
### Changed
Expand Down
2 changes: 1 addition & 1 deletion lib/format.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ exports.stationEntry = stationEntry;
function calendarEntry(entry) {
var dateFormat = function(value) {
if (value) {
var dateObj = Moment(value, '[XY,] DD. MMM YYYY', 'de');
var dateObj = Moment.utc(value, '[XY,] DD. MMM YYYY', 'de');
return dateObj.startOf('day').toDate();
}
return value;
Expand Down

0 comments on commit 0d50838

Please sign in to comment.