diff --git a/countdown.py b/countdown.py index 30a123d..7e8f194 100755 --- a/countdown.py +++ b/countdown.py @@ -2,6 +2,8 @@ import datetime import sys +import locale +locale.setlocale(locale.LC_TIME, "ru_RU.UTF-8") now = datetime.datetime.now() if (len(sys.argv) < 2): @@ -23,4 +25,4 @@ future = datetime.datetime(int(ar[2]),int(ar[1]),int(ar[0]),int(ar2[0]),int(ar2[ result = future - now days = result.days hours = datetime.datetime.strftime((datetime.datetime.utcfromtimestamp(result.seconds)), "%H:%M:%S") -print ("До указанной даты осталось " + str(days) + " дней " + str(hours)) +print ("До " + datetime.datetime.strftime(future, "%d %B %Y года %H:%M") + " осталось " + str(days) + " дней " + str(hours))