You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
>>> from dateutil import parser
>>> d = parser.parse('2024-04-23T14:39:38 CEST')
>>> d.replace(tzinfo=datetime.timezone.utc).timestamp()
dateutil accepts many inputs and is already installed as a dependency on my system for several applications. However, I am skeptical that an additional dependency is warranted considering how rarely most users will roll back their database. I would be happy with just datetime.datetime.fromisoformat.
Makes sense, thanks for taking the time to make the suggestion!
Can structure it so that dateutil is used unless it's not found on the system, in which case it it falls back to using datetime (so there's no formal dependency on dateutil.
Is your feature request related to a problem? Please describe.
--rollback-database
uses Unix timestamps, which can be inconvenient to obtain and are hard to comprehend for humans.Describe the solution you'd like.
--rollback-database
could support human-readable dates (e.g. in ISO format):Or using
dateutil
(examples):dateutil
accepts many inputs and is already installed as a dependency on my system for several applications. However, I am skeptical that an additional dependency is warranted considering how rarely most users will roll back their database. I would be happy with justdatetime.datetime.fromisoformat
.In short:
The text was updated successfully, but these errors were encountered: