Skip to content

Commit

Permalink
Python: Improved Readability and Alignment of Timestamp Regex Patterns (
Browse files Browse the repository at this point in the history
  • Loading branch information
hiteshbedre authored Sep 8, 2023
1 parent 768e516 commit a113e26
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions python/pyiceberg/utils/datetime.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@

EPOCH_DATE = date.fromisoformat("1970-01-01")
EPOCH_TIMESTAMP = datetime.fromisoformat("1970-01-01T00:00:00.000000")
ISO_TIMESTAMP = re.compile(r"\d\d\d\d-\d\d-\d\dT\d\d:\d\d:\d\d(.\d{1,6})?")
ISO_TIMESTAMP = re.compile(r"\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(.\d{1,6})?")
EPOCH_TIMESTAMPTZ = datetime.fromisoformat("1970-01-01T00:00:00.000000+00:00")
ISO_TIMESTAMPTZ = re.compile(r"\d\d\d\d-\d\d-\d\dT\d\d:\d\d:\d\d(.\d{1,6})?[-+]\d\d:\d\d")
ISO_TIMESTAMPTZ = re.compile(r"\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(.\d{1,6})?[-+]\d{2}:\d{2}")


def micros_to_days(timestamp: int) -> int:
Expand Down

0 comments on commit a113e26

Please sign in to comment.