Skip to content

Commit 8674a7d

Browse files
committed
Fix date & junior
1 parent 2252cea commit 8674a7d

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
44

55
[project]
66
name = "recnetpy"
7-
version = "0.2.53"
7+
version = "0.2.54"
88
authors = [
99
{ name="RecNetBot Development"}
1010
]

src/recnetpy/dataclasses/account.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ class Account(BaseDataClass['AccountResponse']):
2929
#: This is the file name of an account's profile picture.
3030
profile_image: str
3131
#: This is true if the account is a junior account, false if the account is a non-junior account.
32-
is_junior: bool
32+
# is_junior: bool DEPRECATED
3333
#: This is a list of platforms a user plays on. It has these possible values ``['Steam', 'Meta', 'PlayStation', 'Xbox', 'RecNet', 'iOS', 'Android', 'Standalone']``.
3434
platforms: List[str]
3535
#: This is the list of pronouns a user goes by. It has these possible values ``['She / her', 'He / him', 'They / them', 'Ze / hir', 'Ze / zir', 'Xe / xem']``.
@@ -74,7 +74,7 @@ def patch_data(self, data: 'AccountResponse') -> None:
7474
self.display_name = data['displayName']
7575
self.profile_image = data['profileImage']
7676
self.banner_image = data.get("bannerImage", None)
77-
self.is_junior = bool(data['isJunior'])
77+
#self.is_junior = bool(data['isJunior'])
7878
self.platforms = bitmask_decode(data['platforms'], PLATFORM_LIST)
7979
self.personal_pronouns = bitmask_decode(data['personalPronouns'], PERSONAL_PRONOUNS_LIST)
8080
self.identity_flags = bitmask_decode(data['identityFlags'], IDENTITY_FLAGS_LIST)

src/recnetpy/misc/date_to_unix.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from dateutil.parser import isoparse
1+
from datetime import datetime
22

33
def date_to_unix(date: str) -> int:
44
"""
@@ -10,6 +10,6 @@ def date_to_unix(date: str) -> int:
1010
@return: Unix date represented as an integer.
1111
"""
1212

13-
timestamp = isoparse(date).timestamp()
13+
timestamp = datetime.strptime(date, '%m/%d/%Y %H:%M:%S %p').timestamp()
1414

1515
return int(timestamp) # Return UNIX timestamp

0 commit comments

Comments
 (0)