[Pkg-javascript-devel] Bug#930647: this is a timezone issue

Paolo Greppi paolo.greppi at libpf.com
Thu Jun 20 09:37:38 BST 2019


nodejs -e 'dsv = require("."); console.log(dsv.csvFormat([{date: new Date(2018, 0, 1)}]));'
TZ='UTC' nodejs -e 'dsv = require("."); console.log(dsv.csvFormat([{date: new Date(2018, 0, 1)}]));'
TZ='EST' nodejs -e 'dsv = require("."); console.log(dsv.csvFormat([{date: new Date(2018, 0, 1)}]));'
TZ='America/Los_Angeles' nodejs -e 'dsv = require("."); console.log(dsv.csvFormat([{date: new Date(2018, 0, 1)}]));'

outputs respectively:
2017-12-31T23:00Z
2018-01-01
2018-01-01T05:00Z
2018-01-01T08:00Z

looking at the 1st failing test:
   test.deepEqual(dsv.csvFormat([{date: new Date(2018, 0, 1)}]), "date\n2018-01-01T08:00Z");
it looks like the upstream developers live in California

so it can be fixed with:
https://salsa.debian.org/js-team/node-d3-dsv/commit/9a445e4a6c01237c5e73a71daa8ad142450007e9

Paolo



More information about the Pkg-javascript-devel mailing list