Skip to content

Commit

Permalink
change minimum date to 1970 to fix errors with mktime on windows
Browse files Browse the repository at this point in the history
  • Loading branch information
Moritz Haseloff committed Feb 20, 2024
1 parent 315f454 commit 8e672a0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/picframe/controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ def __init__(self, model, viewer):
self.__paused = False
self.__force_navigate = False
self.__next_tm = 0
self.__date_from = make_date('1901/12/15') # TODO This seems to be the minimum date to be handled by date functions # noqa: E501
self.__date_from = make_date('1970/1/2') # TODO This seems to be the minimum date to be handled by date functions # noqa: E501
self.__date_to = make_date('2038/1/1')
self.__location_filter = ""
self.__where_clauses = {}
Expand Down Expand Up @@ -132,7 +132,7 @@ def date_from(self, val):
try:
self.__date_from = float(val)
except ValueError:
self.__date_from = make_date(val if len(val) > 0 else '1901/12/15')
self.__date_from = make_date(val if len(val) > 0 else '1970/1/2')
if len(val) > 0:
self.__model.set_where_clause('date_from', "exif_datetime > {:.0f}".format(self.__date_from))
else:
Expand Down

0 comments on commit 8e672a0

Please sign in to comment.