K
K
kobancheg2020-06-11 00:33:16
Node.js
kobancheg, 2020-06-11 00:33:16

Why can the date be lost in a node.js application without restarting?

The vds server has ubuntu 18.04, node.js 14.4.0 is deployed on ubuntu, the application is a telegram bot written in the telegraf.js framework.

The application has a function that takes tomorrow's date as a variable, which is defined using the dayjs or moment.js libraries.

If the application is not restarted manually or by a script during the day, then tomorrow points to today's date, not tomorrow's, if everything is restarted correctly, different libraries were used for time, the bug is the same.

How can restarting the application be related to the calculation of the date, which is based on the current one, and should not depend on the server or application uptime?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question