mirror of
https://github.com/beetbox/beets.git
synced 2025-12-24 17:43:52 +01:00
Fix #2652 by using local timestamps
Because users write their queries in local time, we want to get a local time tuple from the timestamp stored in the database.
This commit is contained in:
parent
492ff7359a
commit
502536f4b6
2 changed files with 6 additions and 1 deletions
|
|
@ -708,7 +708,7 @@ class DateQuery(FieldQuery):
|
|||
if self.field not in item:
|
||||
return False
|
||||
timestamp = float(item[self.field])
|
||||
date = datetime.utcfromtimestamp(timestamp)
|
||||
date = datetime.fromtimestamp(timestamp)
|
||||
return self.interval.contains(date)
|
||||
|
||||
_clause_tmpl = "{0} {1} ?"
|
||||
|
|
|
|||
|
|
@ -46,6 +46,11 @@ Fixes:
|
|||
* Avoid a crash when importing a non-ASCII filename when using an ASCII locale
|
||||
on Unix under Python 3.
|
||||
:bug:`2793` :bug:`2803`
|
||||
* Fix a problem caused by time zone misalignment that could make date queries
|
||||
fail to match certain dates that are near the edges of a range. For example,
|
||||
querying for dates within a certain month would fail to match dates within
|
||||
hours of the end of that month.
|
||||
:bug:`2652`
|
||||
|
||||
|
||||
1.4.6 (December 21, 2017)
|
||||
|
|
|
|||
Loading…
Reference in a new issue