Search found 1 match

by anyone14959
Sun Feb 06, 2022 6:41 pm
Forum: ESP8266 boards
Topic: timezone support in MicroPython ?
Replies: 23
Views: 104736

Re: timezone support in MicroPython ?

For me this works perfect and returns a tuple with correct localtime with tz and dst def truetime_calc(tz = 1): # timezone dst = 0 cur_year = utime.localtime()[0] start_dst = [cur_year,3,24,2,0,0,0,0] end_dst = [cur_year,10,24,3,0,0,0,0] start_dst[2] += 6 - utime.localtime(utime.mktime(start_dst))[6...