node-firebird
node-firebird copied to clipboard
wrong time
trafficstars
It looks like there is a problem with getting the correct time. (winter/summer) The code looks like this:
var d = new Date(0);
d.getTimezoneOffset() * MsPerMinute
But the offset here is always the same since Date(0) is always the same day.
A change like this would solve it:
var d = new Date(0);
getTimeOffset(d);
function getTimeOffset(d) {
var offset1 = d.getTimezoneOffset();
var offset2 = (new Date).getTimezoneOffset();
return (offset1 - offset2) * MsPerMinute;
}
I made the change here: https://github.com/r03/node-firebird/commit/49e6c94d2325c71f2459744329b4306499783614#diff-6d186b954a58d5bb740f73d84fe39073
I could create a pull request, but I don't think this project is still maintained.