Skip to content

Commit

Permalink
Merge pull request #8002 from ThomasWaldmann/remove-dateutil-1.4
Browse files Browse the repository at this point in the history
get rid of dateutil
  • Loading branch information
ThomasWaldmann authored Dec 26, 2023
2 parents 68109e7 + 2d97dcf commit 6ce8bd6
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 5 deletions.
1 change: 0 additions & 1 deletion requirements.d/development.lock.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,3 @@ pytest-xdist==3.5.0
pytest-cov==4.1.0
pytest-benchmark==4.0.0
Cython==3.0.7
python-dateutil==2.8.2
1 change: 0 additions & 1 deletion requirements.d/development.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,4 @@ pytest-xdist
pytest-cov
pytest-benchmark
Cython
python-dateutil
pre-commit
5 changes: 2 additions & 3 deletions src/borg/testsuite/archiver.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import argparse
import dateutil.tz
import errno
import io
import json
Expand Down Expand Up @@ -2207,8 +2206,8 @@ def test_prune_repository(self):
# Given a date and time in local tz, create a UTC timestamp string suitable
# for create --timestamp command line option
def _to_utc_timestamp(self, year, month, day, hour, minute, second):
dtime = datetime(year, month, day, hour, minute, second, 0, dateutil.tz.gettz())
return dtime.astimezone(dateutil.tz.UTC).strftime("%Y-%m-%dT%H:%M:%S")
dtime = datetime(year, month, day, hour, minute, second, 0).astimezone() # local time with local timezone
return dtime.astimezone(timezone.utc).strftime("%Y-%m-%dT%H:%M:%S")

def _create_archive_ts(self, name, y, m, d, H=0, M=0, S=0):
loc = self.repository_location + '::' + name
Expand Down

0 comments on commit 6ce8bd6

Please sign in to comment.