0

Shouldn't moment use the local timezone for everything when created with moment()? enter image description here

It definitely doesn't. Is there any way around using .local() everywhere? Or am I doing anything wrong? This might cause many bugs in my application and it is the first time I come across it.

I have to add that I had the node application running and put my PC in sleep - after waking it up this occurs! A new node instance doesn't let me reproduce it!

TheProgrammer
  • 784
  • 1
  • 6
  • 20
  • [The solution seems to be provided here](https://stackoverflow.com/questions/41595585/how-to-set-language-globally-for-moment-js) – farvilain Nov 01 '20 at 23:49
  • @farvilain Shouldn't moment automatically use the local timezone? It does in any new instance but the strange thing is that this bug occurs when the application is running for some time - in this example the PC was put in sleep mode and revoked after midnight, wehen the error occured. When i created a new instance of node at the same time it worked in one instance while it did not in the other. – TheProgrammer Nov 01 '20 at 23:59
  • Either there is a bug, either you made a mistake. But without providing a tiny code and the step to reproduce, I have no enough knowledge on it to help you. Maybe the moment team. Sorry – farvilain Nov 02 '20 at 00:03
  • @farvilain There is no more code to reproduce than on the screenshot. It can clearly be seen that there is a problem - i will create an issue for the moment team. – TheProgrammer Nov 02 '20 at 00:16

0 Answers0