Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Don't apply DST offset in parseISO when parsing date, fixes #1449
- Loading branch information
Showing
3 changed files
with
18 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
// This is basic DST test for parseISO | ||
|
||
import parseISO from '../../../src/parseISO' | ||
import assert from 'assert' | ||
|
||
if (process.env.TZ !== 'Australia/Sydney') | ||
throw new Error('The test must be run with TZ=Australia/Sydney') | ||
|
||
if (parseInt(process.version.match(/^v(\d+)\./)[1]) < 10) | ||
throw new Error('The test must be run on Node.js version >= 10') | ||
|
||
assert.equal(parseISO('2019-10-06').getDate(), 6) |