You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Looking at the example in README.md - it looks like μs.now() should be returning the unix timestamp with microseconds... i.e. the number of microseconds elapsed since 1970.
...which is: Thursday, 3 July 2014 2:38:00 PM UTC, which makes sense, as that was around the time when the package was first published.
But when I run the same code shown in the examples I don't get the time since 1970, I get the operating system's uptime instead.
Here's my code, which I can't see being any different from README.md:
constμs=require('microseconds');constnow=μs.now();console.log(`Now is: `,now);console.log(`Parsed is: `,μs.parse(now));console.log(`Parsed is: `,μs.parse(now).toString());
I get the output:
Now is: 436458757931.173
Parsed is: { microseconds: 931,
milliseconds: 757,
seconds: 18,
minutes: 14,
hours: 1,
days: 5,
toString: [Function: toString] }
Parsed is: 5 days 1 hour 14 minutes 18 seconds 757 milliseconds 931 microseconds
I get the same result on both Windows (Node v12.14.1) and Linux (Node v10.17.0).
The text was updated successfully, but these errors were encountered:
Looking at the example in README.md - it looks like
μs.now()
should be returning the unix timestamp with microseconds... i.e. the number of microseconds elapsed since 1970.The example shows:
...which is: Thursday, 3 July 2014 2:38:00 PM UTC, which makes sense, as that was around the time when the package was first published.
But when I run the same code shown in the examples I don't get the time since 1970, I get the operating system's uptime instead.
Here's my code, which I can't see being any different from README.md:
I get the output:
I get the same result on both Windows (Node v12.14.1) and Linux (Node v10.17.0).
The text was updated successfully, but these errors were encountered: