Skip to content

Commit

Permalink
#225: Add timezone info to session details on ICAT backend
Browse files Browse the repository at this point in the history
  • Loading branch information
MRichards99 committed Apr 30, 2021
1 parent f30caa6 commit 26b7bd6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion datagateway_api/common/icat/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import logging

from cachetools import cached
from dateutil.tz import tzlocal
from icat.entities import getTypeMap
from icat.exception import (
ICATInternalError,
Expand Down Expand Up @@ -114,7 +115,7 @@ def get_session_details_helper(client):
"""
session_time_remaining = client.getRemainingMinutes()
session_expiry_time = (
datetime.now() + timedelta(minutes=session_time_remaining)
datetime.now(tzlocal()) + timedelta(minutes=session_time_remaining)
).replace(microsecond=0)
username = client.getUserName()

Expand Down

0 comments on commit 26b7bd6

Please sign in to comment.