|
67 | 67 | # 6 hour default. |
68 | 68 | CLOCK_SYNC_INTERVAL = 6 * 60 * 60 |
69 | 69 | # Load time zone string from settings.toml, else IP geolocation is used |
70 | | -# (http://worldtimeapi.org/api/timezone for list). Again, this is only |
| 70 | +# (https://time.now/developer/api/timezone for list). Again, this is only |
71 | 71 | # used for the 'Last checked' display, not predictions, so it's not |
72 | 72 | # especially disruptive if missing. |
73 | 73 | # pylint: disable=bare-except |
@@ -117,17 +117,17 @@ def parse_time(timestring, is_dst=-1): |
117 | 117 | def update_time(timezone=None): |
118 | 118 | """ Update system date/time from WorldTimeAPI public server; |
119 | 119 | no account required. Pass in time zone string |
120 | | - (http://worldtimeapi.org/api/timezone for list) |
| 120 | + (https://time.now/developer/api/timezone for list) |
121 | 121 | or None to use IP geolocation. Returns current local time as a |
122 | 122 | time.struct_time and UTC offset as string. This may throw an |
123 | 123 | exception on fetch_data() - it is NOT CAUGHT HERE, should be |
124 | 124 | handled in the calling code because different behaviors may be |
125 | 125 | needed in different situations (e.g. reschedule for later). |
126 | 126 | """ |
127 | 127 | if timezone: # Use timezone api |
128 | | - time_url = 'http://worldtimeapi.org/api/timezone/' + timezone |
| 128 | + time_url = 'https://time.now/developer/api/timezone/' + timezone |
129 | 129 | else: # Use IP geolocation |
130 | | - time_url = 'http://worldtimeapi.org/api/ip' |
| 130 | + time_url = 'https://time.now/developer/api/ip' |
131 | 131 |
|
132 | 132 | time_data = NETWORK.fetch_data(time_url, |
133 | 133 | json_path=[['datetime'], ['dst'], |
|
0 commit comments