What is Nostr?
NiceMicro /
npub12jd…f3yw
2024-08-31 23:03:44

NiceMicro on Nostr: #Python magicians of the Fediverse! What is the correct way of converting a datetime ...

#Python magicians of the Fediverse!

What is the correct way of converting a datetime column in #Pandas to my local timezone?

If I do:
```
songlist.head(15)["Time added"].dt.tz_localize("UTC").dt.tz_convert("Asia/Seoul")
```
I have to manually give my location in a string, and for some reason, the `tz_convert` command doesn't recognize "KST" which is what I get from `time.tzname`.

```
datetime.datetime.now().tzinfo
```
returns nothing. What to do?

#Programming #AskFedi
Author Public Key
npub12jd7fmxd94cptasr8jwlzwn2a9u7upzh9dw9upvnqh0d636qlzrqn3f3yw