From 1320a3709b1683cb32b69abdaa9e7e120b6ed59c Mon Sep 17 00:00:00 2001 From: Harmon Date: Wed, 29 Sep 2021 00:22:45 -0500 Subject: [PATCH] Stop checking Client request parameter name when converting to datetime --- tweepy/client.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tweepy/client.py b/tweepy/client.py index e3b445b..1077e17 100644 --- a/tweepy/client.py +++ b/tweepy/client.py @@ -143,7 +143,7 @@ class Client: if isinstance(param_value, list): request_params[param_name] = ','.join(map(str, param_value)) - elif param_name in ("start_time", "end_time") and isinstance(param_value, datetime.datetime): + elif isinstance(param_value, datetime.datetime): if param_value.tzinfo is not None: param_value = param_value.astimezone(datetime.timezone.utc) request_params[param_name] = param_value.strftime("%Y-%m-%dT%H:%M:%S.%fZ") -- 2.25.1