Skip to content

Commit eceb0b8

Browse files
committed
Fix resetting service start time on session change.
We're expecting a Unix timestamp here, not a JS one. In general, timestamps are a bit of a mess - the original Timing71 was written in Python and used Unix timestamps exclusively (so all prior recordings also use Unix timestamps). Some parts of the JS rewrite use JS timestamps and others use Unix timestamps. Some sort of rationality would be nice...
1 parent b70e55c commit eceb0b8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/services/services.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ export class Service extends EventEmitter {
5050
this.service = {
5151
...this.service,
5252
currentSessionIndex: (this.service.currentSessionIndex || 0) + 1,
53-
startTime: Date.now()
53+
startTime: Math.floor(Date.now() / 1000)
5454
};
5555
this.emit(Events.SESSION_CHANGE, this.service.currentSessionIndex);
5656
}

0 commit comments

Comments
 (0)