view client/src/lib/session.js @ 216:494a257e7715

Called schema prefixed sys_admin.create_user instead of create_user.
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Tue, 24 Jul 2018 11:20:46 +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 };