Mercurial > gemma
view client/src/lib/session.js @ 172:a422471db08a
Automate running DB-tests with an extra database
run_tests.sh allows to run database tests easily without
affecting other existing databases and on a clean basis.
Because roles are cluster-wide, they cannot be easily droped
and recreated without affecting other databases. Thus,
moved their creation to roles.sql and in passing removed
unnecessary role 'gemma'.
author | Tom Gottfried <tom@intevation.de> |
---|---|
date | Thu, 12 Jul 2018 16:30:01 +0200 |
parents | 4bf2173748f3 |
children | 27502291e564 |
line wrap: on
line source
function sessionStillActive(expiresFromPastSession) { if (!expiresFromPastSession) return false; const now = Date.now(); const stillActive = now < expiresFromPastSession; return stillActive; } function toMillisFromString(timestring) { return timestring * 1000; } export { sessionStillActive, toMillisFromString };