I try to manipulate the time and get these errors on raspberry pi.
Running these on my mac in python no problems.
Running these on my mac in python no problems.
What is wrong?
Code: Select all
current_time = time.localtime()
^^^^^^^^^^^^^^
AttributeError: 'Time' object has no attribute 'localtime'
File "/home/pi/Moon/subpoint.py", line 311, in <module>
currentMillis = int(round(time.time() * 1000)) # Convert seconds to milliseconds
^^^^^^^^^
AttributeError: 'Time' object has no attribute 'time'