summaryrefslogtreecommitdiff
path: root/date-fns/test/formatISO/india.js
diff options
context:
space:
mode:
Diffstat (limited to 'date-fns/test/formatISO/india.js')
-rw-r--r--date-fns/test/formatISO/india.js13
1 files changed, 13 insertions, 0 deletions
diff --git a/date-fns/test/formatISO/india.js b/date-fns/test/formatISO/india.js
new file mode 100644
index 0000000..6062069
--- /dev/null
+++ b/date-fns/test/formatISO/india.js
@@ -0,0 +1,13 @@
+import formatISO from '../../src/formatISO'
+import assert from 'assert'
+
+if (process.env.TZ !== 'Asia/Kolkata')
+ throw new Error('The test must be run with TZ=Asia/Kolkata')
+
+if (parseInt(process.version.match(/^v(\d+)\./)[1]) < 10)
+ throw new Error('The test must be run on Node.js version >= 10')
+
+assert.equal(
+ formatISO(new Date(1986, 3, 4, 10, 33, 1)),
+ '1986-04-04T10:33:01+05:30'
+)