Skip to content

Commit

Permalink
circulation: fix loan end_date
Browse files Browse the repository at this point in the history
* Closes #2198.

Co-Authored-by: Renaud Michotte <renaud.michotte@gmail.com>
  • Loading branch information
zannkukai authored and iGor milhit committed Oct 6, 2021
1 parent 5b13154 commit 1adeabd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion rero_ils/modules/loans/utils.py
Expand Up @@ -58,7 +58,7 @@ def get_default_loan_duration(loan, initial_loan):
# - use hours and minutes from now
# - check regarding end of day (eod), 23:59
# - correct the hours/date regarding library timezone
eod = timedelta(hours=23, minutes=59, seconds=59, milliseconds=999)
eod = timedelta(hours=23, minutes=59, seconds=00, milliseconds=000)
aware_eod = eod - library.get_timezone().utcoffset(now, is_dst=True)
time_to_eod = aware_eod - timedelta(hours=now.hour, minutes=now.minute)

Expand Down

0 comments on commit 1adeabd

Please sign in to comment.