Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Node.js setTimeout not fired after system time change

I have such script

setTimeout(function() 
{
    console.log("Timeout");
}, 1000 * 60);

When I run it and change system time back for one hour, the timeout not fires. If I change time forward for one hour, timeout works correctly.

Time is changed by external program which makes call like ioctl( rtcFd, RTC_SET_TIME, &newTime);

How to fix this problem?

We use Node.js v0.10.15 on OpenWRT Attitude Adjustment

Thank you

like image 542
Ruslan Abelharisov Avatar asked Apr 15 '16 08:04

Ruslan Abelharisov


1 Answers

I just founded that this is a bug fixed in newer version. It fixed by this commit in v0.10.33.

If you meet this problem, you need to update or patch your node.js

like image 133
Ruslan Abelharisov Avatar answered Nov 10 '22 06:11

Ruslan Abelharisov