Hi 👋
Describe the solution you'd like
I think Submission.created_utc should contain a datetime object, instead of just the unix timestamp.
Describe alternatives you've considered
Currently, one has to wrap those themselves:
from datetime import datetime, timezone
post: Submission
posted_at = datetime.fromtimestamp(post.created_utc, timezone.utc)
Now, I have two variables, post and posted_at, that have information tied together, instead of just having one post variable, and accessing everything I'd need from it. Doing this:
# overwrite the attribute
post.created_utc = datetime.fromtimestamp(post.created_utc, timezone.utc)
... is risky, because the library may not expect this data type to be there.
Additional context
This would have to be applied to every object with a created_utc attribute, including submissions, comments, redditors, live threads, messages, etc. The same should probably apply to the edited attribute, which appears to be either false or specify the edition timestamp: https://i.imgur.com/1Mwbi9X.png In this case, the attribute should probably be either None when not edited, and datetime specifying the edition time when edited. The current documentation of "Whether or not the submission has been edited." is slightly misleading on this fact right now.
Hi 👋
Describe the solution you'd like
I think
Submission.created_utcshould contain adatetimeobject, instead of just the unix timestamp.Describe alternatives you've considered
Currently, one has to wrap those themselves:
Now, I have two variables,
postandposted_at, that have information tied together, instead of just having onepostvariable, and accessing everything I'd need from it. Doing this:... is risky, because the library may not expect this data type to be there.
Additional context
This would have to be applied to every object with a
created_utcattribute, including submissions, comments, redditors, live threads, messages, etc. The same should probably apply to theeditedattribute, which appears to be eitherfalseor specify the edition timestamp: https://i.imgur.com/1Mwbi9X.png In this case, the attribute should probably be eitherNonewhen not edited, anddatetimespecifying the edition time when edited. The current documentation of "Whether or not the submission has been edited." is slightly misleading on this fact right now.