moribvndvs / ng2-idle

Responding to idle users in Angular (not AngularJS) applications.
https://moribvndvs.github.io/ng2-idle
Apache License 2.0
322 stars 129 forks source link

idleExpiry compare UTC and local time #198

Open koo9 opened 5 months ago

koo9 commented 5 months ago

by looking at the code, in https://github.com/moribvndvs/ng2-idle/blob/master/projects/core/src/lib/idleexpiry.ts in this function isExpired(): boolean { const expiry = this.last(); return expiry != null && expiry <= this.now(); }

this.last() is UTC time, this.now is local time, so it's comparing UTC and local time, is it a bug?