Skip to content

Commit

Permalink
Use get_datetime_str_now()
Browse files Browse the repository at this point in the history
  • Loading branch information
dboulware committed Mar 22, 2024
1 parent ed24584 commit 9243243
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scos_actions/calibration/sensor_calibration.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

from scos_actions.calibration.interfaces.calibration import Calibration
from scos_actions.calibration.utils import CalibrationEntryMissingException
from scos_actions.utils import parse_datetime_iso_format_str
from scos_actions.utils import parse_datetime_iso_format_str, get_datetime_str_now

logger = logging.getLogger(__name__)

Expand Down Expand Up @@ -100,7 +100,7 @@ def expired(self) -> bool:
env = Env()
time_limit = env.int("CALIBRATION_EXPIRATION_LIMIT", default=None)
logger.debug("Checking if calibration has expired.")
now_string = datetime.utcnow().isoformat(timespec="milliseconds") + "Z"
now_string = get_datetime_str_now()
now = parse_datetime_iso_format_str(now_string)
if time_limit is None:
return False
Expand Down

0 comments on commit 9243243

Please sign in to comment.