-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Description
I'm excited to use this library, as I suspect it may help with many of my Emacs datetime issues. I had a couple questions about how to make some transformations, and I'm hoping you might be willing to help.
- One common scenario is I have a timestamp like this and I want to get the UTC version:
>>> ts = "2018-06-12T22:10:00+03:00"
>>> pendulum.parse(ts).in_tz('UTC').to_iso8601_string()
'2018-06-12T19:10:00Z'- Or I have an org-mode format string and I want the ISO format.
>>> ts = "[2018-06-12 Tue 22:10]"
>>> pendulum.from_format(ts, "[YYYY-MM-DD ddd HH:mm]", tz='America/New_York'
).to_iso8601_string()
'2018-06-12T22:10:00-04:00'I couldn't figure out how to do these in datetime.el. Would you be willing to show how to do this, if that functionality is available? Thanks very much!
Metadata
Metadata
Assignees
Labels
No labels