while True:\r
lcd.clear()\r
time = utime.localtime()\r
- lcd.putstr("{year}/{month}/{day} {HH}:{MM}:{SS}".format(\r
- year=str(time[0]), month=str(time[1]), day=str(time[2]),\r
- HH=str(time[3]), MM=str(time[4]), SS=str(time[5])))\r
+ lcd.putstr("{year:>04d}/{month:>02d}/{day:>02d} {HH:>02d}:{MM:>02d}:{SS:>02d}".format(\r
+ year=time[0], month=time[1], day=time[2],\r
+ HH=time[3], MM=time[4], SS=time[5]))\r
if count % 10 == 0:\r
print("Turning cursor on")\r
lcd.show_cursor()\r