Skip to content

Commit

Permalink
Merge pull request #6 from 0trust/master
Browse files Browse the repository at this point in the history
Python 3 support
  • Loading branch information
Tset-Noitamotua authored May 26, 2019
2 parents c56e61c + dc19ac7 commit 679a807
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ build/

# Python / virtual environments
venv
venv3

# Robot Framework / test output
results/
7 changes: 3 additions & 4 deletions src/DateTimeTZ/DateTimeTZ.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@


class DateTimeTZ:

"""
Robot Framework [https://github.com/testautomation/DateTimeTZ|DateTimeTZ] library provides functionality for manipulating date and time in different locales and time zones.\n
DateTime library is based on [http://babel.pocoo.org|Babel] and [http://labix.org/python-dateutil|python-dateutil].
Expand All @@ -26,7 +25,7 @@ def wait(self, seconds):
| *Keyword* | *Argument* |
| Wait | 5 |
"""
print "Suspend test execution on " + str(seconds) + " seconds."
print("Suspend test execution on " + str(seconds) + " seconds.")
time.sleep(int(seconds))

def get_unix_time(self):
Expand Down Expand Up @@ -88,7 +87,7 @@ def get_timestamp(self, locale="en", time_format="dd-LL-y H:mm:ss.A", *args, **d
INFO : ${timestamp_with_delta} = Янв. 2014 17:54\n
INFO : ${delta_and_cpecific_part} = Янв. 2012 17:54
"""
delta = dict((key, int(value)) for (key, value) in delta.items())
delta = dict((key, int(value)) for (key, value) in list(delta.items()))
timestamp = datetime.today() + relativedelta(**delta)
return format_datetime(timestamp, time_format, locale=locale)

Expand All @@ -102,7 +101,7 @@ def get_utc_timestamp(self, locale="en", time_format="dd-LL-y H:mm:ss.A", *args,
*Example result:*\n
INFO : ${utc_timestamp} = 13 Март 2014 11:32:58
"""
delta = dict((key, int(value)) for (key, value) in delta.items())
delta = dict((key, int(value)) for (key, value) in list(delta.items()))
timestamp = datetime.utcnow() + relativedelta(**delta)
return format_datetime(timestamp, time_format, locale=locale)

Expand Down
2 changes: 1 addition & 1 deletion src/DateTimeTZ/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
# Copyright (c) 2014 Roman Merkushin / rmerkushin@ya.ru
# Update 2019 by Tset Noitamotua

from DateTimeTZ import DateTimeTZ
from .DateTimeTZ import DateTimeTZ
from .version import __version__
2 changes: 1 addition & 1 deletion src/DateTimeTZ/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.

__version__ = '1.0.1'
__version__ = '1.0.2'

0 comments on commit 679a807

Please sign in to comment.