Skip to content

Commit

Permalink
notifications: fix timezone for process_date
Browse files Browse the repository at this point in the history
* Closes #3296

Co-Authored-by: Peter Weber <peter.weber@rero.ch>
  • Loading branch information
rerowep committed Nov 14, 2023
1 parent e07c8be commit 5d0f5c7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions rero_ils/modules/notifications/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
from __future__ import absolute_import, print_function

from abc import ABC, abstractmethod
from datetime import datetime
from datetime import datetime, timezone
from functools import partial

from flask import current_app
Expand Down Expand Up @@ -284,7 +284,7 @@ def update_process_date(self, sent=False, status=NotificationStatus.DONE):
:param status: the new notification status.
:return the updated notification.
"""
self['process_date'] = datetime.utcnow().isoformat()
self['process_date'] = datetime.now(timezone.utc).isoformat()
self['notification_sent'] = sent
self['status'] = status
return self.update(
Expand Down

0 comments on commit 5d0f5c7

Please sign in to comment.