Skip to content

Commit 90aff92

Browse files
LaunchDarklyReleaseBotrobertjnealLaunchDarklyCIeli-darklybwoskow-ld
authored
prepare 8.2.1 release (#229)
## [8.2.1] - 2023-10-20 ### Fixed: - Replace deprecated `utcfromtimestamp` usage. --------- Co-authored-by: Robert J. Neal <[email protected]> Co-authored-by: Robert J. Neal <[email protected]> Co-authored-by: LaunchDarklyCI <[email protected]> Co-authored-by: Eli Bishop <[email protected]> Co-authored-by: Ben Woskow <[email protected]> Co-authored-by: Ember Stevens <[email protected]> Co-authored-by: ember-stevens <[email protected]> Co-authored-by: Matthew M. Keeler <[email protected]> Co-authored-by: charukiewicz <[email protected]> Co-authored-by: LaunchDarklyReleaseBot <[email protected]> Co-authored-by: Christian Charukiewicz <[email protected]> Co-authored-by: Matthew M. Keeler <[email protected]> Co-authored-by: Ben Woskow <[email protected]> Co-authored-by: Gavin Whelan <[email protected]> Co-authored-by: Elliot <[email protected]> Co-authored-by: Gabor Angeli <[email protected]> Co-authored-by: Elliot <[email protected]> Co-authored-by: LaunchDarklyCI <[email protected]> Co-authored-by: hroederld <[email protected]> Co-authored-by: Louis Chan <[email protected]> Co-authored-by: prpnmac <[email protected]> Co-authored-by: Louis Chan <[email protected]> Co-authored-by: Daniel Fritz <[email protected]>
1 parent b6cfd70 commit 90aff92

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

ldclient/impl/model/value_parsing.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
import re
22
from re import Pattern
33
from semver import VersionInfo
4-
from datetime import tzinfo, timedelta, datetime
4+
from datetime import tzinfo, timedelta, datetime, timezone
55
from numbers import Number
66
from typing import Any, Optional
77

88
import pyrfc3339
99

1010
_ZERO = timedelta(0)
1111

12-
# A UTC class.
1312

13+
# A UTC class.
1414
class _UTC(tzinfo):
1515
"""UTC"""
1616

@@ -23,7 +23,8 @@ def tzname(self, dt):
2323
def dst(self, dt):
2424
return _ZERO
2525

26-
_epoch = datetime.utcfromtimestamp(0).replace(tzinfo=_UTC())
26+
27+
_epoch = datetime.fromtimestamp(0, timezone.utc)
2728

2829

2930
def is_number(input: Any) -> bool:

0 commit comments

Comments
 (0)