mirror of
https://github.com/Xinyuan-LilyGO/T-Display-S3.git
synced 2024-09-21 09:57:26 +00:00
Merge branch 'Xinyuan-LilyGO:main' into main
This commit is contained in:
commit
79517a67ef
@ -384,6 +384,9 @@ void timeavailable(struct timeval *t) {
|
||||
}
|
||||
|
||||
void setTimezone() {
|
||||
#ifdef CUSTOM_TIMEZONE
|
||||
String timezone = CUSTOM_TIMEZONE;
|
||||
#else
|
||||
const char *rootCACertificate = "-----BEGIN CERTIFICATE-----\n"
|
||||
"MIIDzTCCArWgAwIBAgIQCjeHZF5ftIwiTv0b7RQMPDANBgkqhkiG9w0BAQsFADBa\n"
|
||||
"MQswCQYDVQQGEwJJRTESMBAGA1UEChMJQmFsdGltb3JlMRMwEQYDVQQLEwpDeWJl\n"
|
||||
@ -431,7 +434,7 @@ void setTimezone() {
|
||||
}
|
||||
delete client;
|
||||
}
|
||||
|
||||
#endif
|
||||
for (uint32_t i = 0; i < sizeof(zones); i++) {
|
||||
if (timezone == "none") {
|
||||
timezone = "CST-8";
|
||||
|
@ -12,6 +12,8 @@
|
||||
#define NTP_SERVER2 "time.nist.gov"
|
||||
#define GMT_OFFSET_SEC 0
|
||||
#define DAY_LIGHT_OFFSET_SEC 0
|
||||
// if CUSTOM_TIMEZONE is not defined then TIMEZONE API used based on IP, check zones.h
|
||||
// #define CUSTOM_TIMEZONE "Europe/London"
|
||||
|
||||
/* Automatically update local time */
|
||||
#define GET_TIMEZONE_API "https://ipapi.co/timezone/"
|
||||
|
Loading…
Reference in New Issue
Block a user