mirror of
https://github.com/ansible-collections/hetzner.hcloud.git
synced 2026-02-04 08:01:49 +00:00
test: support python >=3.7 for ansible-test (#235)
* test: only test for python >=3.7 * refactor: remove python 2 utc timezone workaround
This commit is contained in:
parent
a6fe943a9a
commit
e83997517d
3 changed files with 5 additions and 27 deletions
|
|
@ -1,24 +0,0 @@
|
|||
from __future__ import absolute_import, division, print_function
|
||||
|
||||
__metaclass__ = type
|
||||
|
||||
from datetime import timedelta, tzinfo
|
||||
|
||||
ZERO = timedelta(0)
|
||||
HOUR = timedelta(hours=1)
|
||||
|
||||
|
||||
class UTC(tzinfo):
|
||||
"""Custom UTC for compatibility with Python 2.7"""
|
||||
|
||||
def utcoffset(self, dt):
|
||||
return ZERO
|
||||
|
||||
def tzname(self, dt):
|
||||
return "UTC"
|
||||
|
||||
def dst(self, dt):
|
||||
return ZERO
|
||||
|
||||
|
||||
utc = UTC()
|
||||
Loading…
Add table
Add a link
Reference in a new issue