Search found 2 matches
- Wed Sep 05, 2018 1:24 pm
- Forum: ESP8266 boards
- Topic: timezone support in MicroPython ?
- Replies: 23
- Views: 92699
Re: timezone support in MicroPython ? DST/EST
def dstTime(): year = time.localtime()[0] #get current year # print(year) HHMarch = time.mktime((year,3 ,(14-(int(5*year/4+1))%7),1,0,0,0,0,0)) #Time of March change to DST HHNovember = time.mktime((year,10,(7-(int(5*year/4+1))%7),1,0,0,0,0,0)) #Time of October change to EST # print(HHNovember) now=...
- Wed Sep 05, 2018 1:23 pm
- Forum: ESP8266 boards
- Topic: timezone support in MicroPython ?
- Replies: 23
- Views: 92699
Re: timezone support in MicroPython ?
def dstTime(): year = time.localtime()[0] #get current year # print(year) HHMarch = time.mktime((year,3 ,(14-(int(5*year/4+1))%7),1,0,0,0,0,0)) #Time of March change to DST HHNovember = time.mktime((year,10,(7-(int(5*year/4+1))%7),1,0,0,0,0,0)) #Time of November change to EST # print(HHNovember) now...