From 1dacc502a8e6da1149a24c2f1eff999cefe6adce Mon Sep 17 00:00:00 2001 From: mark-boer Date: Sun, 24 Mar 2019 21:00:24 +0100 Subject: [PATCH] fix issue where the default start_date argument of sentinel2 fails when you have a positive offset timezone --- aws_sat_api/search.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aws_sat_api/search.py b/aws_sat_api/search.py index f2e8126..f631eba 100644 --- a/aws_sat_api/search.py +++ b/aws_sat_api/search.py @@ -169,7 +169,7 @@ def sentinel2(utm: Union[str, int], lat: str, grid: str, s2_bucket = f'{sentinel_bucket}-{level}' request_pays = True - start_date = start_date or datetime(2015, 1, 1) + start_date = start_date or datetime(2015, 1, 1, tzinfo=timezone.utc) end_date = end_date or datetime.now(timezone.utc) # Converts the time zone or sets a new tz for naive objects.