Skip to content

Date range filter with timezone #143

Closed
@tzoiker

Description

@tzoiker

Request with the date_range fails for datetime.datetime objects with the timezone specified

$ tz = pytz.timezone('UTC')
$ dt = datetime.datetime(2018,1,1, tzinfo=tz)
$ date_range('acquired', gte=dt)
>>> {'field_name': 'acquired', 'type': 'DateRangeFilter', 'config': {'gte': '2018-01-01T00:00:00+00:00Z'}}

It can be seen that Z is still appended to the end, which does not seem to be valid ISO8601 string.

Metadata

Metadata

Assignees

Labels

bugverifiedreported issue can be reproduced

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions