mirror of
https://github.com/ansible-collections/hetzner.hcloud.git
synced 2026-02-04 08:01:49 +00:00
feat: Server Type Deprecation (#222)
* feat(server_type_info): return deprecation info Co-authored-by: jo <ljonas@riseup.net> * feat(server): show warning if server-type is deprecated Co-authored-by: jo <ljonas@riseup.net> --------- Co-authored-by: jo <ljonas@riseup.net>
This commit is contained in:
parent
9b471cbb00
commit
082153a700
6 changed files with 109 additions and 15 deletions
24
plugins/module_utils/utc.py
Normal file
24
plugins/module_utils/utc.py
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
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