Я хочу получить свое текущее время и использовать
from time import *
asctime(gmtime())
за это.
Однако я получаю время по Гринвичу + 0 вместо моего местного времени, которое равно GMT + 3:
...$ ipython
Python 2.7.12 (default, Nov 12 2018, 14:36:49)
Type "copyright", "credits" or "license" for more information.
IPython 5.8.0 -- An enhanced Interactive Python.
? -> Introduction and overview of IPython's features.
%quickref -> Quick reference.
help -> Python's own help system.
object? -> Details about 'object', use 'object??' for extra details.
In [1]: from time import *; asctime(gmtime())
Out[1]: 'Tue Jul 2 12:02:06 2019'
In [2]:
Do you really want to exit ([y]/n)?
...$ date
Tue Jul 2 15:02:12 IDT 2019
...$
Как настроить время на мое местное время, не изменяя вручную кортеж, возвращаемый из gmtime()?






https://docs.python.org/3/library/time.html#time.localtime
time.localtime([secs])
Like gmtime() but converts to local time. If secs is not provided or None, the current time as returned by time() is used. The dst flag is set to 1 when DST applies to the given time.
изменить asctime на местное время