How are timestamps managed in NodeBB?
truetuna last edited by
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?
DateObjects 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).
Yeah we store the number of milliseconds since the Unix epoch.
Robert last edited by
@julian Prepared in advance, love it.