I'm troubleshooting an OAuth Authentication issue (invalid_grant) where one of two possible causes is the server's clock being out of sync with NTP. I've ensured the server's clock is synchronized.
Does nodejs instantiate its own clock or reference the system clock?
I expect it would reference the system clock. I only ask because restarting nodejs temporarily fixes the issue (invalid_grant), and I would like to rule out time synchronization.
js, Node. js) will keep their leading positions in app development in 2022. They are robust solutions for building dynamic and single-page web applications.
Avoid Using Node. js: Processing CPU heavy and complex applications: Node. js uses an event-based, non-blocking I/O architecture and only has one CPU – all of that intensive CPU processing would block incoming requests. As a result of the high-end number crunching, the thread might get stuck.
Since Node. js uses non-blocking IO, the server can handle multiple requests without waiting for each one to complete, which means Node. js can handle a much higher volume of web traffic than other more traditional languages.
There are two way nodejs handle time.
using javascript Date
or using process.hrtime
Assuming node core uses process.hrtime
and you absolutely need to know, I would take a look at the libuv uv_hrtime function which node uses.
Maybe you have found a bug on the uv_hrtime
. Whenever I use process.hrtime
I never had problem like I did using Date
hope this points you at righ direction.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With