Hi all,
I'd like to retrieve the local time in a Python script running on Venus.
Venus is set to the correct timezone in the GUI ("New Zealand Standard Time") and shows the correct time too. The file system however does not reflect that; /etc/timezone contains "Universal".
Running "date" on the Venus command line shows UTC.
In Python there's also difference between UTC and local time:
Python 2.7.13 (default, Oct 16 2018, 12:48:19)
[GCC 7.3.0] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import datetime
>>> print datetime.datetime.utcnow()
2019-06-29 00:48:51.582668
>>> print datetime.datetime.now()
2019-06-29 00:48:57.102877
>>> import time
>>> print time.localtime()
time.struct_time(tm_year=2019, tm_mon=6, tm_mday=29, tm_hour=0, tm_min=49, tm_sec=59, tm_wday=5, tm_yday=180, tm_isdst=0)
Any suggestions?
Jan