How are timestamps managed in NodeBB?
-
I might be missing something but does NodeBB do something extra to timestamps? I'm trying to convert the "lastonline" timestamp to a datetime:
~/w/nodebb ❯❯❯ redis-cli 127.0.0.1:6379> HGETALL user:1 ... 13) "lastonline" 14) "1447135877476" ...
but I end up getting something like the above.
If I remove the last 3 digits, I get something a bit closer to the real time.
Time is hard . Can anyone explain what's going on?
-
JavaScript
Date
Objects return timestamps in milliseconds, so you have to crop the last 3 digits for examining the unix timestamp (which you want to get for the converter you seem to use).
Copyright © 2024 NodeBB | Contributors