Questions tagged [python-iso8601]

A simple thrid-party module to parse ISO 8601 dates.

This module parses the most common forms of ISO 8601 date strings (e.g. "2007-01-14T20:34:22+00:00") into datetime objects. Available on pypi: iso8601

4 questions
2
votes
2 answers

How to get difference between 2 dates with different ISO format?

I need to calculate the difference between 2 differently formatted ISO dates. For example, 2019-06-28T05:28:14Z and 2019-06-28T05:28:14-04:00. Most of the answers here focus on only one format or another, i.e Z-formatted. Here is what I have…
hydradon
  • 1,316
  • 1
  • 21
  • 52
1
vote
0 answers

ISO 8601 Format in Celery Logs

I'm trying to customize date formatting of my celery app's log results when to write into a file. I couldn't find a way to handle this issue. from celery import Celery from celery import signals app =…
rom_pep
  • 87
  • 8
0
votes
3 answers

How to dynamically extract date from different time stamp format?

I have following time stamp received as event to the lambda function where i need to extract the date from the timestamp import datetime as dt case1_time=2021-06-23T00:05:05-04:00 case2_time=2021-08-03T04:57:52.30-04:00 def…
0
votes
0 answers

Incorrect time when parsing to datetime object from ISO8601 [Python 3.9]

Im trying to get from a set of ISO8601 timestampts (sort to say) a correct datetime object in Python 3.9, the problem comes here: When trying to parse (for instance) the ISO8601 timestamp 2021-06-25T14:00:00.000Z into a datetime object un Python I…