Fix default grid filter when "local" date times are involved

This commit is contained in:
Lance Edgar 2023-10-18 21:25:13 -05:00
parent 13565d1c45
commit 230a54cb99

View file

@ -652,6 +652,9 @@ class Grid(object):
elif isinstance(column.type, sa.Date):
factory = gridfilters.AlchemyDateFilter
elif isinstance(column.type, sa.DateTime):
if self.assume_local_times:
factory = gridfilters.AlchemyLocalDateTimeFilter
else:
factory = gridfilters.AlchemyDateTimeFilter
elif isinstance(column.type, GPCType):
factory = gridfilters.AlchemyGPCFilter