Skip to content

Commit

Permalink
revert datetime
Browse files Browse the repository at this point in the history
  • Loading branch information
martinfleis committed Oct 21, 2023
1 parent e3c68c3 commit 781d8fa
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions libpysal/io/iohandlers/pyDbfIO.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ class DBF(tables.DataTable):
MODES = ["r", "w"]

def __init__(self, *args, **kwargs):

tables.DataTable.__init__(self, *args, **kwargs)

if self.mode == "r":
Expand Down Expand Up @@ -196,7 +195,6 @@ def _get_col(self, key: str) -> list:
return col

def read_record(self, i: int) -> list:

self.seek(i)

rec = list(struct.unpack(self.record_fmt, self.f.read(self.record_size)))
Expand Down Expand Up @@ -326,7 +324,6 @@ def flush(self):
self.f.flush()

def close(self):

if self.mode == "w":
self.flush()
# End of file
Expand Down Expand Up @@ -364,8 +361,8 @@ def _writeHeader(self):
POS = self.f.tell()
self.f.seek(0)
ver = 3
now = datetime.datetime.fromtimestamp(
int(os.environ.get("SOURCE_DATE_EPOCH", time.time())), datetime.UTC
now = datetime.datetime.utcfromtimestamp(
int(os.environ.get("SOURCE_DATE_EPOCH", time.time())),
)

yr, mon, day = now.year - 1900, now.month, now.day
Expand Down

0 comments on commit 781d8fa

Please sign in to comment.