View Single Post
Posts: 1,417 | Thanked: 2,619 times | Joined on Jan 2011 @ Touring
#116
A reminder that Maebble users need to manually toggle the settings.py when daylight savings begins and ends.
There is more information upthread.
https://talk.maemo.org/showpost.php?...6&postcount=89

Code:
def get_localtime():^M
    ts = 0^M
# uncomment the +23 line below (spring/daylight savings time in UCT +2 zone customize for your zone(ie: (utc +2 - 1hr = 1) (24-1=23))) & uncomment != 0:(fall standard time) line which will sync with GMT on your phone, set + number for correct local time vs UCT(zulu/GMT time).^M
    if time.daylight != 0:^M
    #if time.daylight > +23:^M
        ts = int(time.time()) - time.altzone^M
    else:^M
        ts = int(time.time()) - time.timezone^M
    return ts^M

Last edited by biketool; 2021-10-31 at 16:45.
 

The Following 2 Users Say Thank You to biketool For This Useful Post: