@@ -91,7 +91,9 @@ def get_expiration_seconds_v2(expiration):
91
91
"""Convert 'expiration' to a number of seconds in the future.
92
92
93
93
:type expiration: Union[Integer, datetime.datetime, datetime.timedelta]
94
- :param expiration: Point in time when the signed URL should expire.
94
+ :param expiration: Point in time when the signed URL should expire. If
95
+ a ``datetime`` instance is passed without an explicit
96
+ ``tzinfo`` set, it will be assumed to be ``UTC``.
95
97
96
98
:raises: :exc:`TypeError` when expiration is not a valid type.
97
99
@@ -123,7 +125,9 @@ def get_expiration_seconds_v4(expiration):
123
125
"""Convert 'expiration' to a number of seconds offset from the current time.
124
126
125
127
:type expiration: Union[Integer, datetime.datetime, datetime.timedelta]
126
- :param expiration: Point in time when the signed URL should expire.
128
+ :param expiration: Point in time when the signed URL should expire. If
129
+ a ``datetime`` instance is passed without an explicit
130
+ ``tzinfo`` set, it will be assumed to be ``UTC``.
127
131
128
132
:raises: :exc:`TypeError` when expiration is not a valid type.
129
133
:raises: :exc:`ValueError` when expiration is too large.
@@ -299,7 +303,9 @@ def generate_signed_url_v2(
299
303
Caller should have already URL-encoded the value.
300
304
301
305
:type expiration: Union[Integer, datetime.datetime, datetime.timedelta]
302
- :param expiration: Point in time when the signed URL should expire.
306
+ :param expiration: Point in time when the signed URL should expire. If
307
+ a ``datetime`` instance is passed without an explicit
308
+ ``tzinfo`` set, it will be assumed to be ``UTC``.
303
309
304
310
:type api_access_endpoint: str
305
311
:param api_access_endpoint: (Optional) URI base. Defaults to empty string.
@@ -461,7 +467,9 @@ def generate_signed_url_v4(
461
467
Caller should have already URL-encoded the value.
462
468
463
469
:type expiration: Union[Integer, datetime.datetime, datetime.timedelta]
464
- :param expiration: Point in time when the signed URL should expire.
470
+ :param expiration: Point in time when the signed URL should expire. If
471
+ a ``datetime`` instance is passed without an explicit
472
+ ``tzinfo`` set, it will be assumed to be ``UTC``.
465
473
466
474
:type api_access_endpoint: str
467
475
:param api_access_endpoint: (Optional) URI base. Defaults to
0 commit comments