diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 1a77983..447e16b 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -12,16 +12,6 @@ If you don't find anything, please [open a new issue](https://github.com/khoih-p ### How to submit a bug report -Please report bugs in ESP_WiFiManager if you find them. - -However, before reporting a bug please check through the following: - -* [Existing Open Issues](https://github.com/khoih-prog/ESP_WiFiManager/issues) - someone might have already encountered this. - -If you don't find anything, please [open a new issue](https://github.com/khoih-prog/ESP_WiFiManager/issues/new). - -### How to submit a bug report - Please ensure to specify the following, or your post will be ignored and deleted: * Arduino IDE version (e.g. 1.8.19) or Platform.io version @@ -39,7 +29,7 @@ Please ensure to specify the following, or your post will be ignored and deleted Arduino IDE version: 1.8.19 ESP8266 Core Version 3.0.2 OS: Ubuntu 20.04 LTS -Linux xy-Inspiron-3593 5.15.0-48-generic #54~20.04.1-Ubuntu SMP Thu Sep 1 16:17:26 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux +Linux xy-Inspiron-3593 5.15.0-52-generic #58~20.04.1-Ubuntu SMP Thu Oct 13 13:09:46 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux Context: I encountered a crash when using this library @@ -50,6 +40,7 @@ Steps to reproduce: 3. ... 4. ... ``` +--- ### Sending Feature Requests @@ -57,7 +48,28 @@ Feel free to post feature requests. It's helpful if you can explain exactly why There are usually some outstanding feature requests in the [existing issues list](https://github.com/khoih-prog/ESPAsync_WiFiManager/issues?q=is%3Aopen+is%3Aissue+label%3Aenhancement), feel free to add comments to them. +--- + ### Sending Pull Requests Pull Requests with changes and fixes are also welcome! +Please use the `astyle` to reformat the updated library code as follows (demo for Ubuntu Linux) + +1. Change directory to the library GitHub + +``` +xy@xy-Inspiron-3593:~$ cd Arduino/xy/ESPAsync_WiFiManager_GitHub/ +xy@xy-Inspiron-3593:~/Arduino/xy/ESPAsync_WiFiManager_GitHub$ +``` + +2. Issue astyle command + +``` +xy@xy-Inspiron-3593:~/Arduino/xy/ESPAsync_WiFiManager_GitHub$ bash utils/restyle.sh +``` + + + + + diff --git a/README.md b/README.md index 253dc14..853aa24 100644 --- a/README.md +++ b/README.md @@ -2199,7 +2199,7 @@ This is terminal debug output when running [Async_ConfigOnDRD_FS_MQTT_Ptr_Medium ``` Starting Async_ConfigOnDRD_FS_MQTT_Ptr_Medium using LittleFS on ESP32_DEV -ESPAsync_WiFiManager v1.15.0 +ESPAsync_WiFiManager v1.15.1 ESP_DoubleResetDetector v1.3.2 Config File not found Can't read Config File, using default values @@ -2218,7 +2218,7 @@ Opening Configuration Portal. No timeout : DRD or No stored Credentials.. ``` Starting Async_ConfigOnDRD_FS_MQTT_Ptr_Medium using LittleFS on ESP32_DEV -ESPAsync_WiFiManager v1.15.0 +ESPAsync_WiFiManager v1.15.1 ESP_DoubleResetDetector v1.3.2 Config File not found Can't read Config File, using default values @@ -2304,7 +2304,7 @@ This is terminal debug output when running [Async_ConfigOnDRD_FS_MQTT_Ptr_Comple ``` Starting Async_ConfigOnDRD_FS_MQTT_Ptr_Complex using LittleFS on ESP8266_NODEMCU_ESP12E -ESPAsync_WiFiManager v1.15.0 +ESPAsync_WiFiManager v1.15.1 ESP_DoubleResetDetector v1.3.2 {"AIO_SERVER_Label":"io.adafruit.com","AIO_SERVERPORT_Label":"1883","AIO_USERNAME_Label":"user_name","AIO_KEY_Label":"aio_key"} Config File successfully parsed @@ -2344,7 +2344,7 @@ TWWWW WTWWW ``` Starting Async_ConfigOnDRD_FS_MQTT_Ptr_Complex using LittleFS on ESP8266_NODEMCU_ESP12E -ESPAsync_WiFiManager v1.15.0 +ESPAsync_WiFiManager v1.15.1 ESP_DoubleResetDetector v1.3.2 {"AIO_SERVER_Label":"io.adafruit.com","AIO_SERVERPORT_Label":"1883","AIO_USERNAME_Label":"user_name","AIO_KEY_Label":"aio_key"} Config File successfully parsed @@ -2434,7 +2434,7 @@ This is terminal debug output when running [Async_ConfigOnDoubleReset](examples/ ```cpp Starting Async_ConfigOnDoubleReset with DoubleResetDetect using SPIFFS on ESP32_DEV -ESPAsync_WiFiManager v1.15.0 +ESPAsync_WiFiManager v1.15.1 ESP_DoubleResetDetector v1.3.2 [WM] RFC925 Hostname = ConfigOnDoubleReset [WM] setSTAStaticIPConfig for USE_CONFIGURABLE_DNS @@ -2493,7 +2493,7 @@ This is terminal debug output when running [Async_ConfigOnDoubleReset](examples/ ```cpp Starting Async_ConfigOnDoubleReset with DoubleResetDetect using LittleFS on ESP8266_NODEMCU_ESP12E -ESPAsync_WiFiManager v1.15.0 +ESPAsync_WiFiManager v1.15.1 ESP_DoubleResetDetector v1.3.2 [WM] RFC925 Hostname = ConfigOnDoubleReset [WM] setSTAStaticIPConfig for USE_CONFIGURABLE_DNS @@ -2553,7 +2553,7 @@ This is terminal debug output when running [Async_ESP_FSWebServer_DRD](examples/ ```cpp Starting Async_ESP_FSWebServer_DRD using LittleFS on ESP8266_NODEMCU_ESP12E -ESPAsync_WiFiManager v1.15.0 +ESPAsync_WiFiManager v1.15.1 ESP_DoubleResetDetector v1.3.2 Opening / directory FS File: CanadaFlag_1.png, size: 40.25KB @@ -2631,7 +2631,7 @@ This is terminal debug output when running [Async_ESP32_FSWebServer_DRD](example ``` Starting Async_ESP32_FSWebServer_DRD using LittleFS on ESP32_DEV -ESPAsync_WiFiManager v1.15.0 +ESPAsync_WiFiManager v1.15.1 ESP_DoubleResetDetector v1.3.2 FS File: /CanadaFlag_1.png, size: 40.25KB FS File: /CanadaFlag_2.png, size: 8.12KB @@ -2742,7 +2742,7 @@ This is terminal debug output when running [Async_ConfigOnDoubleReset](examples/ ``` Starting Async_ConfigOnDoubleReset using LittleFS on ESP32S2_DEV -ESPAsync_WiFiManager v1.15.0 +ESPAsync_WiFiManager v1.15.1 ESP_DoubleResetDetector v1.3.2 ESP Self-Stored: SSID = HueNet1, Pass = 12345678 [WM] * Add SSID = HueNet1 , PW = 12345678 @@ -2779,7 +2779,7 @@ This is terminal debug output when running [Async_ConfigOnDoubleReset_TZ](exampl ``` Starting Async_ConfigOnDoubleReset_TZ using LittleFS on ESP32_DEV -ESPAsync_WiFiManager v1.15.0 +ESPAsync_WiFiManager v1.15.1 ESP_DoubleResetDetector v1.3.2 ESP Self-Stored: SSID = HueNet1, Pass = password [WM] * Add SSID = HueNet1 , PW = password @@ -2823,7 +2823,7 @@ Local Date/Time: Fri Oct 7 16:19:03 2022 ``` Starting Async_ConfigOnDoubleReset_TZ using LittleFS on ESP32_DEV -ESPAsync_WiFiManager v1.15.0 +ESPAsync_WiFiManager v1.15.1 ESP_DoubleResetDetector v1.3.2 ESP Self-Stored: SSID = HueNet1, Pass = password [WM] * Add SSID = HueNet1 , PW = password @@ -2870,7 +2870,7 @@ This is terminal debug output when running [Async_ESP_FSWebServer_DRD](examples/ ``` Starting Async_ESP_FSWebServer_DRD using LittleFS on ESP8266_NODEMCU_ESP12E -ESPAsync_WiFiManager v1.15.0 +ESPAsync_WiFiManager v1.15.1 ESP_DoubleResetDetector v1.3.2 Opening / directory FS File: drd.dat, size: 4B @@ -2944,7 +2944,7 @@ Local Date/Time: Fri Oct 7 16:18:03 2022 ``` Starting Async_ESP_FSWebServer_DRD using LittleFS on ESP8266_NODEMCU_ESP12E -ESPAsync_WiFiManager v1.15.0 +ESPAsync_WiFiManager v1.15.1 ESP_DoubleResetDetector v1.3.2 Opening / directory FS File: drd.dat, size: 4B @@ -3003,7 +3003,7 @@ This is terminal debug output when running [Async_ConfigOnDoubleReset_TZ](exampl ``` Starting Async_ConfigOnDoubleReset_TZ using SPIFFS on ESP32C3_DEV -ESPAsync_WiFiManager v1.15.0 +ESPAsync_WiFiManager v1.15.1 ESP_DoubleResetDetector v1.3.2 ESP Self-Stored: SSID = HueNet1, Pass = 12345678 [WM] * Add SSID = HueNet1 , PW = 12345678 @@ -3049,7 +3049,7 @@ This is terminal debug output when running [Async_ConfigOnDoubleReset](examples/ ``` Starting Async_ConfigOnDoubleReset using LittleFS on ESP32S3_DEV -ESPAsync_WiFiManager v1.15.0 +ESPAsync_WiFiManager v1.15.1 ESP_DoubleResetDetector v1.3.2 ESP Self-Stored: SSID = HueNet1, Pass = password [WM] * Add SSID = HueNet1 , PW = password @@ -3092,7 +3092,7 @@ This is terminal debug output when running [Async_ConfigOnDoubleReset](examples/ ``` Starting Async_ConfigOnDoubleReset using LittleFS on ESP32C3_DEV -ESPAsync_WiFiManager v1.15.0 +ESPAsync_WiFiManager v1.15.1 ESP_DoubleResetDetector v1.3.2 ESP Self-Stored: SSID = HueNet1, Pass = password [WM] * Add SSID = HueNet1 , PW = password @@ -3185,7 +3185,12 @@ Submit issues to: [ESPAsync_WiFiManager issues](https://github.com/khoih-prog/ES 18. Thanks to [Dean Ott](https://github.com/deanjott) for reporting [WiFiManager works only on port 80 #75](https://github.com/khoih-prog/ESPAsync_WiFiManager/issues/75) and providing the solution leading to v1.9.7 19. Thanks to [Twaste](https://github.com/Twaste) for initiate the discussion in [Different behaviour using the src_cpp or src_h lib #80](https://github.com/khoih-prog/ESPAsync_WiFiManager/discussions/80) and providing the idea to the solution, to fix `multiple-definitions` linker error, leading to v1.10.0 20. Thanks to [Zongyi Yang](https://github.com/ZongyiYang) for creating merged PR [Fixes Captive Portal hanging depending on active core for AsyncTCP #100 #104](https://github.com/khoih-prog/ESPAsync_WiFiManager/pull/104). -21. Thanks to [MattiaCC93](https://github.com/MattiaCC93) for open discussion [Help for storing variables in memory (non-volatile) #87](https://github.com/khoih-prog/ESP_WiFiManager/discussions/87#discussioncomment-3593028) and report the ESP32 chipID bug, leading to v1.14.0. +21. Thanks to [MattiaCC93](https://github.com/MattiaCC93) for open discussion [Help for storing variables in memory (non-volatile) #87](https://github.com/khoih-prog/ESP_WiFiManager/discussions/87#discussioncomment-3593028) and report the ESP32 chipID bug, leading to v1.14.0 +22. Thanks to [slaesh](https://github.com/slaesh) for creating merged PRs +- [fix: using random CH for non-password use too #118](https://github.com/khoih-prog/ESPAsync_WiFiManager/pull/118) +- [fix: ending portal loop without processing its flags #119](https://github.com/khoih-prog/ESPAsync_WiFiManager/pull/119) +, leading to v1.15.1 + @@ -3220,6 +3225,9 @@ Submit issues to: [ESPAsync_WiFiManager issues](https://github.com/khoih-prog/ES + + +
ZongyiYang
Zongyi Yang

MattiaCC93
MattiaCC93

slaesh
slaesh

--- diff --git a/changelog.md b/changelog.md index 8f89de1..52435f1 100644 --- a/changelog.md +++ b/changelog.md @@ -12,6 +12,7 @@ ## Table of Contents * [Changelog](#changelog) + * [Releases v1.15.1](#releases-v1151) * [Releases v1.15.0](#releases-v1150) * [Releases v1.14.1](#releases-v1141) * [Releases v1.14.0](#releases-v1140) @@ -54,6 +55,13 @@ ## Changelog +### Releases v1.15.1 + +1. Using random channel for softAP without password. Check [fix: using random CH for non-password use too #118](https://github.com/khoih-prog/ESPAsync_WiFiManager/pull/118) +2. Fix bug. Check [fix: ending portal loop without processing its flags #119](https://github.com/khoih-prog/ESPAsync_WiFiManager/pull/119) +3. Add astyle using `allman` style. Restyle the library + + ### Releases v1.15.0 1. Optionally display Credentials (SSIDs, PWDs) in Config Portal. Check [Populate portal wifi with saved credentials #91](https://github.com/khoih-prog/ESP_WiFiManager/discussions/91) and [Prepopulating the configuration with SSID and Password from stored file #115](https://github.com/khoih-prog/ESPAsync_WiFiManager/discussions/115) diff --git a/library.json b/library.json index fbe49d0..0b886ba 100644 --- a/library.json +++ b/library.json @@ -1,6 +1,6 @@ { "name": "ESPAsync_WiFiManager", - "version": "1.15.0", + "version": "1.15.1", "keywords": "wifi, WiFiManager, esp8266, esp32, esp32-s2, esp32-s3, esp32-c3, AsyncWebServer, Async-WiFiManager, MultiWiFi, Async, Communication, Credentials, Config-Portal, DoubleReset, MultiReset, littlefs, spiffs, dns-server, iot, eeprom", "description": "ESP32 (including ESP32-S2, ESP32-S3 and ESP32-C3), ESP8266 WiFi Connection Manager using AsyncWebServer, with enhanced GUI and fallback Web ConfigPortal. This Library is used for configuring ESP32 (including ESP32-S2, ESP32-S3 and ESP32-C3), ESP8266 modules WiFi Credentials at runtime. You can also specify static DNS servers, personalized HostName, fixed or random AP channel. Now with MultiWiFi auto(Re)connect, configurable CORS Header and auto-Timezone features. Auto detect ESP32 core and use either built-in LittleFS or external LITTLEFS library. Using AsyncDNSServer instead of DNSServer. Now using correct ESP32 chipIP and optionally display Credentials on Config Portal", "authors": diff --git a/library.properties b/library.properties index 2327aea..ab0257a 100644 --- a/library.properties +++ b/library.properties @@ -1,5 +1,5 @@ name=ESPAsync_WiFiManager -version=1.15.0 +version=1.15.1 author=Khoi Hoang maintainer=Khoi Hoang license=MIT diff --git a/src/ESPAsync_WiFiManager-Impl.h b/src/ESPAsync_WiFiManager-Impl.h index bf20c94..7731fb5 100644 --- a/src/ESPAsync_WiFiManager-Impl.h +++ b/src/ESPAsync_WiFiManager-Impl.h @@ -14,7 +14,7 @@ Built by Khoi Hoang https://github.com/khoih-prog/ESPAsync_WiFiManager Licensed under MIT license - Version: 1.15.0 + Version: 1.15.1 Version Modified By Date Comments ------- ----------- ---------- ----------- @@ -30,6 +30,7 @@ 1.14.0 K Hoang 09/09/2022 Fix ESP32 chipID and add ESP_getChipOUI() 1.14.1 K Hoang 15/09/2022 Remove dependency on ESP_AsyncWebServer, ESPAsyncTCP and AsyncTCP in `library.properties` 1.15.0 K Hoang 07/10/2022 Optional display Credentials (SSIDs, PWDs) in Config Portal + 1.15.1 K Hoang 25/10/2022 Using random channel for softAP without password. Add astyle using allman style *****************************************************************************************************************************/ #pragma once @@ -53,7 +54,7 @@ ESPAsync_WMParameter::ESPAsync_WMParameter(const char *custom) ////////////////////////////////////////// ESPAsync_WMParameter::ESPAsync_WMParameter(const char *id, const char *placeholder, const char *defaultValue, - const int& length, const char *custom, const int& labelPlacement) + const int& length, const char *custom, const int& labelPlacement) { init(id, placeholder, defaultValue, length, custom, labelPlacement); } @@ -204,7 +205,7 @@ char* ESPAsync_WiFiManager::getRFC952_hostname(const char* iHostname) j++; } } - + // no '-' as last char if (isalnum(iHostname[len - 1]) || (iHostname[len - 1] != '-')) RFC952_hostname[j] = iHostname[len - 1]; @@ -269,12 +270,14 @@ ESPAsync_WiFiManager::ESPAsync_WiFiManager(AsyncWebServer * webserver, AsyncDNSS ESPAsync_WiFiManager::~ESPAsync_WiFiManager() { #if USE_DYNAMIC_PARAMS + if (_params != NULL) { LOGINFO(F("freeing allocated params!")); free(_params); } + #endif if (networkIndices) @@ -286,9 +289,9 @@ ESPAsync_WiFiManager::~ESPAsync_WiFiManager() ////////////////////////////////////////// #if USE_DYNAMIC_PARAMS -bool ESPAsync_WiFiManager::addParameter(ESPAsync_WMParameter *p) + bool ESPAsync_WiFiManager::addParameter(ESPAsync_WMParameter *p) #else -void ESPAsync_WiFiManager::addParameter(ESPAsync_WMParameter *p) + void ESPAsync_WiFiManager::addParameter(ESPAsync_WMParameter *p) #endif { #if USE_DYNAMIC_PARAMS @@ -300,7 +303,8 @@ void ESPAsync_WiFiManager::addParameter(ESPAsync_WMParameter *p) LOGINFO1(F("Increasing _max_params to:"), _max_params); - ESPAsync_WMParameter** new_params = (ESPAsync_WMParameter**)realloc(_params, _max_params * sizeof(ESPAsync_WMParameter*)); + ESPAsync_WMParameter** new_params = (ESPAsync_WMParameter**)realloc(_params, + _max_params * sizeof(ESPAsync_WMParameter*)); if (new_params != NULL) { @@ -361,6 +365,7 @@ void ESPAsync_WiFiManager::setupConfigPortal() if (!dnsServer) dnsServer = new AsyncDNSServer; + #endif // ( USING_ESP32_S2 || USING_ESP32_C3 ) // optional soft ip config @@ -368,7 +373,8 @@ void ESPAsync_WiFiManager::setupConfigPortal() // Check (https://github.com/khoih-prog/ESP_WiFiManager/issues/58) if (_WiFi_AP_IPconfig._ap_static_ip) { - LOGWARN3(F("Custom AP IP/GW/Subnet = "), _WiFi_AP_IPconfig._ap_static_ip, _WiFi_AP_IPconfig._ap_static_gw, _WiFi_AP_IPconfig._ap_static_sn); + LOGWARN3(F("Custom AP IP/GW/Subnet = "), _WiFi_AP_IPconfig._ap_static_ip, _WiFi_AP_IPconfig._ap_static_gw, + _WiFi_AP_IPconfig._ap_static_sn); WiFi.softAPConfig(_WiFi_AP_IPconfig._ap_static_ip, _WiFi_AP_IPconfig._ap_static_gw, _WiFi_AP_IPconfig._ap_static_sn); } @@ -399,13 +405,13 @@ void ESPAsync_WiFiManager::setupConfigPortal() _apPassword = NULL; } - + LOGWARN1(F("AP PWD ="), _apPassword); } // KH, To enable dynamic/random channel static int channel; - + // Use random channel if _WiFiAPChannel == 0 if (_WiFiAPChannel == 0) channel = (_configPortalStart % MAX_WIFI_CHANNEL) + 1; @@ -422,16 +428,25 @@ void ESPAsync_WiFiManager::setupConfigPortal() /* Setup web pages: root, wifi config pages, SO captive portal detectors and not found. */ - server->on("/", std::bind(&ESPAsync_WiFiManager::handleRoot, this, std::placeholders::_1)).setFilter(ON_AP_FILTER); - server->on("/wifi", std::bind(&ESPAsync_WiFiManager::handleWifi, this, std::placeholders::_1)).setFilter(ON_AP_FILTER); - server->on("/wifisave", std::bind(&ESPAsync_WiFiManager::handleWifiSave, this, std::placeholders::_1)).setFilter(ON_AP_FILTER); - server->on("/close", std::bind(&ESPAsync_WiFiManager::handleServerClose, this, std::placeholders::_1)).setFilter(ON_AP_FILTER); - server->on("/i", std::bind(&ESPAsync_WiFiManager::handleInfo, this, std::placeholders::_1)).setFilter(ON_AP_FILTER); - server->on("/r", std::bind(&ESPAsync_WiFiManager::handleReset, this, std::placeholders::_1)).setFilter(ON_AP_FILTER); - server->on("/state", std::bind(&ESPAsync_WiFiManager::handleState, this, std::placeholders::_1)).setFilter(ON_AP_FILTER); - server->on("/scan", std::bind(&ESPAsync_WiFiManager::handleScan, this, std::placeholders::_1)).setFilter(ON_AP_FILTER); + server->on("/", std::bind(&ESPAsync_WiFiManager::handleRoot, this, + std::placeholders::_1)).setFilter(ON_AP_FILTER); + server->on("/wifi", std::bind(&ESPAsync_WiFiManager::handleWifi, this, + std::placeholders::_1)).setFilter(ON_AP_FILTER); + server->on("/wifisave", std::bind(&ESPAsync_WiFiManager::handleWifiSave, this, + std::placeholders::_1)).setFilter(ON_AP_FILTER); + server->on("/close", std::bind(&ESPAsync_WiFiManager::handleServerClose, this, + std::placeholders::_1)).setFilter(ON_AP_FILTER); + server->on("/i", std::bind(&ESPAsync_WiFiManager::handleInfo, this, + std::placeholders::_1)).setFilter(ON_AP_FILTER); + server->on("/r", std::bind(&ESPAsync_WiFiManager::handleReset, this, + std::placeholders::_1)).setFilter(ON_AP_FILTER); + server->on("/state", std::bind(&ESPAsync_WiFiManager::handleState, this, + std::placeholders::_1)).setFilter(ON_AP_FILTER); + server->on("/scan", std::bind(&ESPAsync_WiFiManager::handleScan, this, + std::placeholders::_1)).setFilter(ON_AP_FILTER); //Microsoft captive portal. Maybe not needed. Might be handled by notFound handler. - server->on("/fwlink", std::bind(&ESPAsync_WiFiManager::handleRoot, this, std::placeholders::_1)).setFilter(ON_AP_FILTER); + server->on("/fwlink", std::bind(&ESPAsync_WiFiManager::handleRoot, this, + std::placeholders::_1)).setFilter(ON_AP_FILTER); server->onNotFound (std::bind(&ESPAsync_WiFiManager::handleNotFound, this, std::placeholders::_1)); server->begin(); // Web server start @@ -525,6 +540,7 @@ String ESPAsync_WiFiManager::networkListAsString() item.replace("{r}", rssiQ); #if defined(ESP8266) + if (wifiSSIDs[i].encryptionType != ENC_TYPE_NONE) #else if (wifiSSIDs[i].encryptionType != WIFI_AUTH_OPEN) @@ -577,9 +593,9 @@ void ESPAsync_WiFiManager::scan() if (wifiSSIDscan) { LOGDEBUG(F("Start scan")); - + wifi_ssid_count_t n = WiFi.scanNetworks(false, true); - + LOGDEBUG(F("Scan done")); if (n == WIFI_SCAN_FAILED) @@ -618,9 +634,11 @@ void ESPAsync_WiFiManager::scan() wifiSSIDs[i].duplicate = false; #if defined(ESP8266) - WiFi.getNetworkInfo(i, wifiSSIDs[i].SSID, wifiSSIDs[i].encryptionType, wifiSSIDs[i].RSSI, wifiSSIDs[i].BSSID, wifiSSIDs[i].channel, wifiSSIDs[i].isHidden); + WiFi.getNetworkInfo(i, wifiSSIDs[i].SSID, wifiSSIDs[i].encryptionType, wifiSSIDs[i].RSSI, wifiSSIDs[i].BSSID, + wifiSSIDs[i].channel, wifiSSIDs[i].isHidden); #else - WiFi.getNetworkInfo(i, wifiSSIDs[i].SSID, wifiSSIDs[i].encryptionType, wifiSSIDs[i].RSSI, wifiSSIDs[i].BSSID, wifiSSIDs[i].channel); + WiFi.getNetworkInfo(i, wifiSSIDs[i].SSID, wifiSSIDs[i].encryptionType, wifiSSIDs[i].RSSI, wifiSSIDs[i].BSSID, + wifiSSIDs[i].channel); #endif } @@ -861,6 +879,7 @@ bool ESPAsync_WiFiManager::startConfigPortal(char const *apName, char const *apP scannow = millis() ; } + #endif // ( USING_ESP32_S2 || USING_ESP32_C3 ) // yield before processing our flags "connect" and/or "stopConfigPortal" @@ -888,7 +907,7 @@ bool ESPAsync_WiFiManager::startConfigPortal(char const *apName, char const *apP //todo: check if any custom parameters actually exist, and check if they really changed maybe _savecallback(); } - + break; } @@ -901,7 +920,7 @@ bool ESPAsync_WiFiManager::startConfigPortal(char const *apName, char const *apP //todo: check if any custom parameters actually exist, and check if they really changed maybe _savecallback(); } - + break; } } @@ -917,16 +936,16 @@ bool ESPAsync_WiFiManager::startConfigPortal(char const *apName, char const *apP } #if ( defined(TIME_BETWEEN_CONFIG_PORTAL_LOOP) && (TIME_BETWEEN_CONFIG_PORTAL_LOOP > 0) ) - #if (_ESPASYNC_WIFIMGR_LOGLEVEL_ > 3) - #warning Using delay in startConfigPortal loop - #endif - +#if (_ESPASYNC_WIFIMGR_LOGLEVEL_ > 3) +#warning Using delay in startConfigPortal loop +#endif + delay(TIME_BETWEEN_CONFIG_PORTAL_LOOP); #endif } WiFi.mode(WIFI_STA); - + if (TimedOut) { setHostname(); @@ -953,6 +972,7 @@ bool ESPAsync_WiFiManager::startConfigPortal(char const *apName, char const *apP void ESPAsync_WiFiManager::setWifiStaticIP() { #if USE_CONFIGURABLE_DNS + if (_WiFi_STA_IPconfig._sta_static_ip) { LOGWARN(F("Custom STA IP/GW/Subnet")); @@ -962,13 +982,15 @@ void ESPAsync_WiFiManager::setWifiStaticIP() { LOGWARN(F("DNS1 and DNS2 set")); - WiFi.config(_WiFi_STA_IPconfig._sta_static_ip, _WiFi_STA_IPconfig._sta_static_gw, _WiFi_STA_IPconfig._sta_static_sn, _WiFi_STA_IPconfig._sta_static_dns1, _WiFi_STA_IPconfig._sta_static_dns2); + WiFi.config(_WiFi_STA_IPconfig._sta_static_ip, _WiFi_STA_IPconfig._sta_static_gw, _WiFi_STA_IPconfig._sta_static_sn, + _WiFi_STA_IPconfig._sta_static_dns1, _WiFi_STA_IPconfig._sta_static_dns2); } else if (_WiFi_STA_IPconfig._sta_static_dns1) { LOGWARN(F("Only DNS1 set")); - WiFi.config(_WiFi_STA_IPconfig._sta_static_ip, _WiFi_STA_IPconfig._sta_static_gw, _WiFi_STA_IPconfig._sta_static_sn, _WiFi_STA_IPconfig._sta_static_dns1); + WiFi.config(_WiFi_STA_IPconfig._sta_static_ip, _WiFi_STA_IPconfig._sta_static_gw, _WiFi_STA_IPconfig._sta_static_sn, + _WiFi_STA_IPconfig._sta_static_dns1); } else { @@ -976,6 +998,7 @@ void ESPAsync_WiFiManager::setWifiStaticIP() WiFi.config(_WiFi_STA_IPconfig._sta_static_ip, _WiFi_STA_IPconfig._sta_static_gw, _WiFi_STA_IPconfig._sta_static_sn); } + //***** End added section for DNS config option ***** LOGINFO1(F("setWifiStaticIP IP ="), WiFi.localIP()); @@ -984,7 +1007,9 @@ void ESPAsync_WiFiManager::setWifiStaticIP() { LOGWARN(F("Can't use Custom STA IP/GW/Subnet")); } + #else + // check if we've got static_ip settings, if we do, use those. if (_WiFi_STA_IPconfig._sta_static_ip) { @@ -992,6 +1017,7 @@ void ESPAsync_WiFiManager::setWifiStaticIP() LOGWARN1(F("Custom STA IP/GW/Subnet : "), WiFi.localIP()); } + #endif } @@ -1035,7 +1061,7 @@ int ESPAsync_WiFiManager::connectWifi(const String& ssid, const String& pass) if (WiFi.status() == WL_CONNECTED) { LOGWARN(F("Already connected. Bailing out.")); - + return WL_CONNECTED; } @@ -1076,7 +1102,7 @@ int ESPAsync_WiFiManager::connectWifi(const String& ssid, const String& pass) } int connRes = waitForConnectResult(); - + LOGWARN1("Connection result: ", getStatus(connRes)); //not connected, WPS enabled, no pass - first attempt @@ -1109,14 +1135,14 @@ wl_status_t ESPAsync_WiFiManager::waitForConnectResult() LOGWARN1(F("Connected after waiting (s) :"), waited / 1000); LOGWARN1(F("Local ip ="), WiFi.localIP()); - // Fix bug, connRes is sometimes not correct. + // Fix bug, connRes is sometimes not correct. //return connRes; return WiFi.status(); } else { LOGERROR(F("Waiting WiFi connection with time out")); - + unsigned long start = millis(); bool keepConnecting = true; wl_status_t status; @@ -1124,15 +1150,16 @@ wl_status_t ESPAsync_WiFiManager::waitForConnectResult() while (keepConnecting) { status = WiFi.status(); - + if (millis() > start + _connectTimeout) { keepConnecting = false; - + LOGERROR(F("Connection timed out")); } #if ( ESP8266 && (USING_ESP8266_CORE_VERSION >= 30000) ) + if (status == WL_CONNECTED || status == WL_CONNECT_FAILED || status == WL_WRONG_PASSWORD) #else if (status == WL_CONNECTED || status == WL_CONNECT_FAILED) @@ -1140,7 +1167,7 @@ wl_status_t ESPAsync_WiFiManager::waitForConnectResult() { keepConnecting = false; } - + delay(100); } @@ -1172,20 +1199,25 @@ const char* ESPAsync_WiFiManager::getStatus(const int& status) { case WL_IDLE_STATUS: return "WL_IDLE_STATUS"; + case WL_NO_SSID_AVAIL: return "WL_NO_SSID_AVAIL"; + case WL_CONNECTED: return "WL_CONNECTED"; + case WL_CONNECT_FAILED: return "WL_CONNECT_FAILED"; #if ( ESP8266 && (USING_ESP8266_CORE_VERSION >= 30000) ) + case WL_WRONG_PASSWORD: return "WL_WRONG_PASSWORD"; #endif case WL_DISCONNECTED: return "WL_DISCONNECTED"; + default: return "UNKNOWN"; } @@ -1222,7 +1254,7 @@ void ESPAsync_WiFiManager::resetSettings() #endif delay(200); - + return; } @@ -1273,7 +1305,7 @@ int ESPAsync_WiFiManager::setConfigPortalChannel(const int& channel) void ESPAsync_WiFiManager::setAPStaticIPConfig(const IPAddress& ip, const IPAddress& gw, const IPAddress& sn) { LOGINFO(F("setAPStaticIPConfig")); - + _WiFi_AP_IPconfig._ap_static_ip = ip; _WiFi_AP_IPconfig._ap_static_gw = gw; _WiFi_AP_IPconfig._ap_static_sn = sn; @@ -1302,7 +1334,7 @@ void ESPAsync_WiFiManager::getAPStaticIPConfig(WiFi_AP_IPConfig &WM_AP_IPconfig void ESPAsync_WiFiManager::setSTAStaticIPConfig(const IPAddress& ip, const IPAddress& gw, const IPAddress& sn) { LOGINFO(F("setSTAStaticIPConfig")); - + _WiFi_STA_IPconfig._sta_static_ip = ip; _WiFi_STA_IPconfig._sta_static_gw = gw; _WiFi_STA_IPconfig._sta_static_sn = sn; @@ -1334,7 +1366,7 @@ void ESPAsync_WiFiManager::setSTAStaticIPConfig(const IPAddress& ip, const IPAdd const IPAddress& dns_address_1, const IPAddress& dns_address_2) { LOGINFO(F("setSTAStaticIPConfig for USE_CONFIGURABLE_DNS")); - + _WiFi_STA_IPconfig._sta_static_ip = ip; _WiFi_STA_IPconfig._sta_static_gw = gw; _WiFi_STA_IPconfig._sta_static_sn = sn; @@ -1405,7 +1437,7 @@ void ESPAsync_WiFiManager::handleRoot(AsyncWebServerRequest *request) String page = FPSTR(WM_HTTP_HEAD_START); page.replace("{v}", "Options"); - + page += FPSTR(WM_HTTP_SCRIPT); page += FPSTR(WM_HTTP_SCRIPT_NTP); page += FPSTR(WM_HTTP_STYLE); @@ -1433,9 +1465,9 @@ void ESPAsync_WiFiManager::handleRoot(AsyncWebServerRequest *request) page += FPSTR(WM_FLDSET_START); page += FPSTR(WM_HTTP_PORTAL_OPTIONS); page += F("
"); - + reportStatus(page); - + page += F("
"); page += FPSTR(WM_FLDSET_END); page += FPSTR(WM_HTTP_END); @@ -1475,7 +1507,7 @@ void ESPAsync_WiFiManager::handleWifi(AsyncWebServerRequest *request) String page = FPSTR(WM_HTTP_HEAD_START); page.replace("{v}", "Config ESP"); - + page += FPSTR(WM_HTTP_SCRIPT); page += FPSTR(WM_HTTP_SCRIPT_NTP); page += FPSTR(WM_HTTP_STYLE); @@ -1491,7 +1523,7 @@ void ESPAsync_WiFiManager::handleWifi(AsyncWebServerRequest *request) if (wifiSSIDCount == 0) { LOGDEBUG(F("handleWifi: No network found")); - + page += F("No network found. Refresh to scan again."); } else @@ -1513,7 +1545,7 @@ void ESPAsync_WiFiManager::handleWifi(AsyncWebServerRequest *request) page += "*Hint: To reuse the saved WiFi credentials, leave SSID and PWD fields empty"; page += FPSTR(WM_HTTP_FORM_START); - + #if DISPLAY_STORED_CREDENTIALS_IN_CP // Populate SSIDs and PWDs if valid page.replace("[[ssid]]", _ssid ); @@ -1521,7 +1553,7 @@ void ESPAsync_WiFiManager::handleWifi(AsyncWebServerRequest *request) page.replace("[[ssid1]]", _ssid1 ); page.replace("[[pwd1]]", _pass1 ); #endif - + char parLength[2]; page += FPSTR(WM_FLDSET_START); @@ -1541,9 +1573,11 @@ void ESPAsync_WiFiManager::handleWifi(AsyncWebServerRequest *request) case WFM_LABEL_BEFORE: pitem = FPSTR(WM_HTTP_FORM_LABEL_BEFORE); break; + case WFM_LABEL_AFTER: pitem = FPSTR(WM_HTTP_FORM_LABEL_AFTER); break; + default: // WFM_NO_LABEL pitem = FPSTR(WM_HTTP_FORM_PARAM); @@ -1555,9 +1589,9 @@ void ESPAsync_WiFiManager::handleWifi(AsyncWebServerRequest *request) pitem.replace("{i}", _params[i]->getID()); pitem.replace("{n}", _params[i]->getID()); pitem.replace("{p}", _params[i]->getPlaceholder()); - + snprintf(parLength, 2, "%d", _params[i]->getValueLength()); - + pitem.replace("{l}", parLength); pitem.replace("{v}", _params[i]->getValue()); pitem.replace("{c}", _params[i]->getCustomHTML()); @@ -1590,15 +1624,16 @@ void ESPAsync_WiFiManager::handleWifi(AsyncWebServerRequest *request) // You have to explicitly specify false to disable the feature. #if !USE_STATIC_IP_CONFIG_IN_CP + if (_WiFi_STA_IPconfig._sta_static_ip) #endif { page += FPSTR(WM_FLDSET_START); String item = FPSTR(WM_HTTP_FORM_LABEL); - + item += FPSTR(WM_HTTP_FORM_PARAM); - + item.replace("{i}", "ip"); item.replace("{n}", "ip"); item.replace("{p}", "Static IP"); @@ -1609,7 +1644,7 @@ void ESPAsync_WiFiManager::handleWifi(AsyncWebServerRequest *request) item = FPSTR(WM_HTTP_FORM_LABEL); item += FPSTR(WM_HTTP_FORM_PARAM); - + item.replace("{i}", "gw"); item.replace("{n}", "gw"); item.replace("{p}", "Gateway IP"); @@ -1620,7 +1655,7 @@ void ESPAsync_WiFiManager::handleWifi(AsyncWebServerRequest *request) item = FPSTR(WM_HTTP_FORM_LABEL); item += FPSTR(WM_HTTP_FORM_PARAM); - + item.replace("{i}", "sn"); item.replace("{n}", "sn"); item.replace("{p}", "Subnet"); @@ -1633,7 +1668,7 @@ void ESPAsync_WiFiManager::handleWifi(AsyncWebServerRequest *request) item = FPSTR(WM_HTTP_FORM_LABEL); item += FPSTR(WM_HTTP_FORM_PARAM); - + item.replace("{i}", "dns1"); item.replace("{n}", "dns1"); item.replace("{p}", "DNS1 IP"); @@ -1644,7 +1679,7 @@ void ESPAsync_WiFiManager::handleWifi(AsyncWebServerRequest *request) item = FPSTR(WM_HTTP_FORM_LABEL); item += FPSTR(WM_HTTP_FORM_PARAM); - + item.replace("{i}", "dns2"); item.replace("{n}", "dns2"); item.replace("{p}", "DNS2 IP"); @@ -1704,16 +1739,18 @@ void ESPAsync_WiFiManager::handleWifiSave(AsyncWebServerRequest *request) /////////////////////// #if USE_ESP_WIFIMANAGER_NTP + if (request->hasArg("timezone")) { _timezoneName = request->arg("timezone"); //.c_str(); - + LOGDEBUG1(F("TZ ="), _timezoneName); } else { LOGDEBUG(F("No TZ arg")); } + #endif /////////////////////// @@ -1738,7 +1775,7 @@ void ESPAsync_WiFiManager::handleWifiSave(AsyncWebServerRequest *request) if (request->hasArg("ip")) { String ip = request->arg("ip"); - + optionalIPFromString(&_WiFi_STA_IPconfig._sta_static_ip, ip.c_str()); LOGDEBUG1(F("New Static IP ="), _WiFi_STA_IPconfig._sta_static_ip.toString()); @@ -1747,7 +1784,7 @@ void ESPAsync_WiFiManager::handleWifiSave(AsyncWebServerRequest *request) if (request->hasArg("gw")) { String gw = request->arg("gw"); - + optionalIPFromString(&_WiFi_STA_IPconfig._sta_static_gw, gw.c_str()); LOGDEBUG1(F("New Static Gateway ="), _WiFi_STA_IPconfig._sta_static_gw.toString()); @@ -1756,18 +1793,19 @@ void ESPAsync_WiFiManager::handleWifiSave(AsyncWebServerRequest *request) if (request->hasArg("sn")) { String sn = request->arg("sn"); - + optionalIPFromString(&_WiFi_STA_IPconfig._sta_static_sn, sn.c_str()); LOGDEBUG1(F("New Static Netmask ="), _WiFi_STA_IPconfig._sta_static_sn.toString()); } #if USE_CONFIGURABLE_DNS + //***** Added for DNS Options ***** if (request->hasArg("dns1")) { String dns1 = request->arg("dns1"); - + optionalIPFromString(&_WiFi_STA_IPconfig._sta_static_dns1, dns1.c_str()); LOGDEBUG1(F("New Static DNS1 ="), _WiFi_STA_IPconfig._sta_static_dns1.toString()); @@ -1776,23 +1814,24 @@ void ESPAsync_WiFiManager::handleWifiSave(AsyncWebServerRequest *request) if (request->hasArg("dns2")) { String dns2 = request->arg("dns2"); - + optionalIPFromString(&_WiFi_STA_IPconfig._sta_static_dns2, dns2.c_str()); LOGDEBUG1(F("New Static DNS2 ="), _WiFi_STA_IPconfig._sta_static_dns2.toString()); } + //***** End added for DNS Options ***** #endif String page = FPSTR(WM_HTTP_HEAD_START); page.replace("{v}", "Credentials Saved"); - + page += FPSTR(WM_HTTP_SCRIPT); page += FPSTR(WM_HTTP_STYLE); page += _customHeadElement; page += FPSTR(WM_HTTP_HEAD_END); page += FPSTR(WM_HTTP_SAVED); - + page.replace("{v}", _apName); page.replace("{x}", _ssid); page.replace("{x1}", _ssid1); @@ -1818,7 +1857,7 @@ void ESPAsync_WiFiManager::handleWifiSave(AsyncWebServerRequest *request) response->addHeader(FPSTR(WM_HTTP_PRAGMA), FPSTR(WM_HTTP_NO_CACHE)); response->addHeader(FPSTR(WM_HTTP_EXPIRES), "-1"); - + request->send(response); #endif // ( USING_ESP32_S2 || USING_ESP32_C3 ) @@ -1837,7 +1876,7 @@ void ESPAsync_WiFiManager::handleServerClose(AsyncWebServerRequest *request) String page = FPSTR(WM_HTTP_HEAD_START); page.replace("{v}", "Close Server"); - + page += FPSTR(WM_HTTP_SCRIPT); page += FPSTR(WM_HTTP_STYLE); page += _customHeadElement; @@ -1871,7 +1910,7 @@ void ESPAsync_WiFiManager::handleServerClose(AsyncWebServerRequest *request) response->addHeader(FPSTR(WM_HTTP_PRAGMA), FPSTR(WM_HTTP_NO_CACHE)); response->addHeader(FPSTR(WM_HTTP_EXPIRES), "-1"); - + request->send(response); #endif // ( USING_ESP32_S2 || USING_ESP32_C3 ) @@ -1893,7 +1932,7 @@ void ESPAsync_WiFiManager::handleInfo(AsyncWebServerRequest *request) String page = FPSTR(WM_HTTP_HEAD_START); page.replace("{v}", "Info"); - + page += FPSTR(WM_HTTP_SCRIPT); page += FPSTR(WM_HTTP_SCRIPT_NTP); page += FPSTR(WM_HTTP_STYLE); @@ -1915,7 +1954,7 @@ void ESPAsync_WiFiManager::handleInfo(AsyncWebServerRequest *request) page += pager; page += F("

WiFi Information

"); - + reportStatus(page); page += FPSTR(WM_FLDSET_START); @@ -1929,12 +1968,12 @@ void ESPAsync_WiFiManager::handleInfo(AsyncWebServerRequest *request) page += String(ESP_getChipId(), HEX); page += F(""); - + page += F("Chip OUI"); page += F("0x"); page += String(getChipOUI(), HEX); page += F(""); - + page += F("Chip Model"); page += ESP.getChipModel(); page += F(" Rev"); @@ -1942,7 +1981,7 @@ void ESPAsync_WiFiManager::handleInfo(AsyncWebServerRequest *request) #endif page += F(""); - + page += F("Flash Chip ID"); #ifdef ESP8266 @@ -1953,11 +1992,11 @@ void ESPAsync_WiFiManager::handleInfo(AsyncWebServerRequest *request) #endif page += F(""); - + page += F("IDE Flash Size"); page += ESP.getFlashChipSize(); page += F(" bytes"); - + page += F("Real Flash Size"); #ifdef ESP8266 @@ -1968,11 +2007,11 @@ void ESPAsync_WiFiManager::handleInfo(AsyncWebServerRequest *request) #endif page += F(" bytes"); - + page += F("Access Point IP"); page += WiFi.softAPIP().toString(); page += F(""); - + page += F("Access Point MAC"); page += WiFi.softAPmacAddress(); page += F(""); @@ -2010,7 +2049,7 @@ void ESPAsync_WiFiManager::handleInfo(AsyncWebServerRequest *request) #else AsyncWebServerResponse *response = request->beginResponse(200, WM_HTTP_HEAD_CT, page); - + response->addHeader(FPSTR(WM_HTTP_CACHE_CONTROL), FPSTR(WM_HTTP_NO_STORE)); #if USING_CORS_FEATURE @@ -2019,7 +2058,7 @@ void ESPAsync_WiFiManager::handleInfo(AsyncWebServerRequest *request) response->addHeader(FPSTR(WM_HTTP_PRAGMA), FPSTR(WM_HTTP_NO_CACHE)); response->addHeader(FPSTR(WM_HTTP_EXPIRES), "-1"); - + request->send(response); #endif // ( USING_ESP32_S2 || USING_ESP32_C3 ) @@ -2035,7 +2074,7 @@ void ESPAsync_WiFiManager::handleState(AsyncWebServerRequest *request) LOGDEBUG(F("State-Json")); String page = F("{\"Soft_AP_IP\":\""); - + page += WiFi.softAPIP().toString(); page += F("\",\"Soft_AP_MAC\":\""); page += WiFi.softAPmacAddress(); @@ -2120,6 +2159,7 @@ void ESPAsync_WiFiManager::handleScan(AsyncWebServerRequest *request) item.replace("{r}", rssiQ); #if defined(ESP8266) + if (wifiSSIDs[i].encryptionType != ENC_TYPE_NONE) #else if (wifiSSIDs[i].encryptionType != WIFI_AUTH_OPEN) @@ -2151,7 +2191,7 @@ void ESPAsync_WiFiManager::handleScan(AsyncWebServerRequest *request) #else AsyncWebServerResponse *response = request->beginResponse(200, WM_HTTP_HEAD_JSON, page); - + response->addHeader(WM_HTTP_CACHE_CONTROL, WM_HTTP_NO_STORE); response->addHeader(WM_HTTP_PRAGMA, WM_HTTP_NO_CACHE); response->addHeader(WM_HTTP_EXPIRES, "-1"); @@ -2171,7 +2211,7 @@ void ESPAsync_WiFiManager::handleReset(AsyncWebServerRequest *request) String page = FPSTR(WM_HTTP_HEAD_START); page.replace("{v}", "WiFi Information"); - + page += FPSTR(WM_HTTP_SCRIPT); page += FPSTR(WM_HTTP_STYLE); page += _customHeadElement; @@ -2184,7 +2224,7 @@ void ESPAsync_WiFiManager::handleReset(AsyncWebServerRequest *request) #else AsyncWebServerResponse *response = request->beginResponse(200, WM_HTTP_HEAD_CT, page); - + response->addHeader(WM_HTTP_CACHE_CONTROL, WM_HTTP_NO_STORE); response->addHeader(WM_HTTP_PRAGMA, WM_HTTP_NO_CACHE); response->addHeader(WM_HTTP_EXPIRES, "-1"); @@ -2243,7 +2283,7 @@ void ESPAsync_WiFiManager::handleNotFound(AsyncWebServerRequest *request) #else AsyncWebServerResponse *response = request->beginResponse( 404, WM_HTTP_HEAD_CT2, message ); - + response->addHeader(FPSTR(WM_HTTP_CACHE_CONTROL), FPSTR(WM_HTTP_NO_STORE)); response->addHeader(FPSTR(WM_HTTP_PRAGMA), FPSTR(WM_HTTP_NO_CACHE)); response->addHeader(FPSTR(WM_HTTP_EXPIRES), "-1"); @@ -2267,9 +2307,9 @@ bool ESPAsync_WiFiManager::captivePortal(AsyncWebServerRequest *request) LOGINFO1(F("Location http://"), toStringIp(request->client()->localIP())); AsyncWebServerResponse *response = request->beginResponse(302, WM_HTTP_HEAD_CT2, ""); - + response->addHeader("Location", String("http://") + toStringIp(request->client()->localIP())); - + request->send(response); return true; @@ -2392,9 +2432,9 @@ String ESPAsync_WiFiManager::getStoredWiFiSSID() else { wifi_config_t conf; - + esp_wifi_get_config(WIFI_IF_STA, &conf); - + return String(reinterpret_cast(conf.sta.ssid)); } @@ -2411,7 +2451,7 @@ String ESPAsync_WiFiManager::getStoredWiFiPass() } wifi_config_t conf; - + esp_wifi_get_config(WIFI_IF_STA, &conf); return String(reinterpret_cast(conf.sta.password)); diff --git a/src/ESPAsync_WiFiManager.h b/src/ESPAsync_WiFiManager.h index 128f20f..827d405 100644 --- a/src/ESPAsync_WiFiManager.h +++ b/src/ESPAsync_WiFiManager.h @@ -5,7 +5,7 @@ ESPAsync_WiFiManager is a library for the ESP8266/Arduino platform, using (ESP)AsyncWebServer to enable easy configuration and reconfiguration of WiFi credentials using a Captive Portal. - Modified from + Modified from 1. Tzapu (https://github.com/tzapu/WiFiManager) 2. Ken Taylor (https://github.com/kentaylor) 3. Alan Steremberg (https://github.com/alanswx/ESPAsyncWiFiManager) @@ -13,8 +13,8 @@ Built by Khoi Hoang https://github.com/khoih-prog/ESPAsync_WiFiManager Licensed under MIT license - - Version: 1.15.0 + + Version: 1.15.1 Version Modified By Date Comments ------- ----------- ---------- ----------- @@ -30,6 +30,7 @@ 1.14.0 K Hoang 09/09/2022 Fix ESP32 chipID and add ESP_getChipOUI() 1.14.1 K Hoang 15/09/2022 Remove dependency on ESP_AsyncWebServer, ESPAsyncTCP and AsyncTCP in `library.properties` 1.15.0 K Hoang 07/10/2022 Optional display Credentials (SSIDs, PWDs) in Config Portal + 1.15.1 K Hoang 25/10/2022 Using random channel for softAP without password. Add astyle using allman style *****************************************************************************************************************************/ #pragma once diff --git a/src/ESPAsync_WiFiManager.hpp b/src/ESPAsync_WiFiManager.hpp index 71aa0e4..55eefdf 100644 --- a/src/ESPAsync_WiFiManager.hpp +++ b/src/ESPAsync_WiFiManager.hpp @@ -5,7 +5,7 @@ ESPAsync_WiFiManager is a library for the ESP8266/Arduino platform, using (ESP)AsyncWebServer to enable easy configuration and reconfiguration of WiFi credentials using a Captive Portal. - Modified from + Modified from 1. Tzapu (https://github.com/tzapu/WiFiManager) 2. Ken Taylor (https://github.com/kentaylor) 3. Alan Steremberg (https://github.com/alanswx/ESPAsyncWiFiManager) @@ -13,8 +13,8 @@ Built by Khoi Hoang https://github.com/khoih-prog/ESPAsync_WiFiManager Licensed under MIT license - - Version: 1.15.0 + + Version: 1.15.1 Version Modified By Date Comments ------- ----------- ---------- ----------- @@ -30,6 +30,7 @@ 1.14.0 K Hoang 09/09/2022 Fix ESP32 chipID and add ESP_getChipOUI() 1.14.1 K Hoang 15/09/2022 Remove dependency on ESP_AsyncWebServer, ESPAsyncTCP and AsyncTCP in `library.properties` 1.15.0 K Hoang 07/10/2022 Optional display Credentials (SSIDs, PWDs) in Config Portal + 1.15.1 K Hoang 25/10/2022 Using random channel for softAP without password. Add astyle using allman style *****************************************************************************************************************************/ #pragma once @@ -77,13 +78,13 @@ //////////////////////////////////////////////////// -#define ESP_ASYNC_WIFIMANAGER_VERSION "ESPAsync_WiFiManager v1.15.0" +#define ESP_ASYNC_WIFIMANAGER_VERSION "ESPAsync_WiFiManager v1.15.1" #define ESP_ASYNC_WIFIMANAGER_VERSION_MAJOR 1 #define ESP_ASYNC_WIFIMANAGER_VERSION_MINOR 15 -#define ESP_ASYNC_WIFIMANAGER_VERSION_PATCH 0 +#define ESP_ASYNC_WIFIMANAGER_VERSION_PATCH 1 -#define ESP_ASYNC_WIFIMANAGER_VERSION_INT 1015000 +#define ESP_ASYNC_WIFIMANAGER_VERSION_INT 1015001 //////////////////////////////////////////////////// diff --git a/src/ESPAsync_WiFiManager_Debug.h b/src/ESPAsync_WiFiManager_Debug.h index 6555e88..52f0f0a 100644 --- a/src/ESPAsync_WiFiManager_Debug.h +++ b/src/ESPAsync_WiFiManager_Debug.h @@ -5,7 +5,7 @@ ESPAsync_WiFiManager is a library for the ESP8266/Arduino platform, using (ESP)AsyncWebServer to enable easy configuration and reconfiguration of WiFi credentials using a Captive Portal. - Modified from + Modified from 1. Tzapu (https://github.com/tzapu/WiFiManager) 2. Ken Taylor (https://github.com/kentaylor) 3. Alan Steremberg (https://github.com/alanswx/ESPAsyncWiFiManager) @@ -13,8 +13,8 @@ Built by Khoi Hoang https://github.com/khoih-prog/ESPAsync_WiFiManager Licensed under MIT license - - Version: 1.15.0 + + Version: 1.15.1 Version Modified By Date Comments ------- ----------- ---------- ----------- @@ -30,6 +30,7 @@ 1.14.0 K Hoang 09/09/2022 Fix ESP32 chipID and add ESP_getChipOUI() 1.14.1 K Hoang 15/09/2022 Remove dependency on ESP_AsyncWebServer, ESPAsyncTCP and AsyncTCP in `library.properties` 1.15.0 K Hoang 07/10/2022 Optional display Credentials (SSIDs, PWDs) in Config Portal + 1.15.1 K Hoang 25/10/2022 Using random channel for softAP without password. Add astyle using allman style *****************************************************************************************************************************/ #pragma once diff --git a/src/utils/TZ.h b/src/utils/TZ.h index 1bd35eb..e96b0c7 100644 --- a/src/utils/TZ.h +++ b/src/utils/TZ.h @@ -68,466 +68,466 @@ //////////////////////////////////////////////////// -#define TZ_Africa_Abidjan ("GMT0") -#define TZ_Africa_Accra ("GMT0") -#define TZ_Africa_Addis_Ababa ("EAT-3") -#define TZ_Africa_Algiers ("CET-1") -#define TZ_Africa_Asmara ("EAT-3") -#define TZ_Africa_Bamako ("GMT0") -#define TZ_Africa_Bangui ("WAT-1") -#define TZ_Africa_Banjul ("GMT0") -#define TZ_Africa_Bissau ("GMT0") -#define TZ_Africa_Blantyre ("CAT-2") -#define TZ_Africa_Brazzaville ("WAT-1") -#define TZ_Africa_Bujumbura ("CAT-2") -#define TZ_Africa_Cairo ("EET-2") -#define TZ_Africa_Casablanca ("<+01>-1") -#define TZ_Africa_Ceuta ("CET-1CEST,M3.5.0,M10.5.0/3") -#define TZ_Africa_Conakry ("GMT0") -#define TZ_Africa_Dakar ("GMT0") -#define TZ_Africa_Dar_es_Salaam ("EAT-3") -#define TZ_Africa_Djibouti ("EAT-3") -#define TZ_Africa_Douala ("WAT-1") -#define TZ_Africa_El_Aaiun ("<+01>-1") -#define TZ_Africa_Freetown ("GMT0") -#define TZ_Africa_Gaborone ("CAT-2") -#define TZ_Africa_Harare ("CAT-2") -#define TZ_Africa_Johannesburg ("SAST-2") -#define TZ_Africa_Juba ("EAT-3") -#define TZ_Africa_Kampala ("EAT-3") -#define TZ_Africa_Khartoum ("CAT-2") -#define TZ_Africa_Kigali ("CAT-2") -#define TZ_Africa_Kinshasa ("WAT-1") -#define TZ_Africa_Lagos ("WAT-1") -#define TZ_Africa_Libreville ("WAT-1") -#define TZ_Africa_Lome ("GMT0") -#define TZ_Africa_Luanda ("WAT-1") -#define TZ_Africa_Lubumbashi ("CAT-2") -#define TZ_Africa_Lusaka ("CAT-2") -#define TZ_Africa_Malabo ("WAT-1") -#define TZ_Africa_Maputo ("CAT-2") -#define TZ_Africa_Maseru ("SAST-2") -#define TZ_Africa_Mbabane ("SAST-2") -#define TZ_Africa_Mogadishu ("EAT-3") -#define TZ_Africa_Monrovia ("GMT0") -#define TZ_Africa_Nairobi ("EAT-3") -#define TZ_Africa_Ndjamena ("WAT-1") -#define TZ_Africa_Niamey ("WAT-1") -#define TZ_Africa_Nouakchott ("GMT0") -#define TZ_Africa_Ouagadougou ("GMT0") -#define TZ_Africa_PortomNovo ("WAT-1") -#define TZ_Africa_Sao_Tome ("GMT0") -#define TZ_Africa_Tripoli ("EET-2") -#define TZ_Africa_Tunis ("CET-1") -#define TZ_Africa_Windhoek ("CAT-2") -#define TZ_America_Adak ("HST10HDT,M3.2.0,M11.1.0") -#define TZ_America_Anchorage ("AKST9AKDT,M3.2.0,M11.1.0") -#define TZ_America_Anguilla ("AST4") -#define TZ_America_Antigua ("AST4") -#define TZ_America_Araguaina ("<-03>3") -#define TZ_America_Argentina_Buenos_Aires ("<-03>3") -#define TZ_America_Argentina_Catamarca ("<-03>3") -#define TZ_America_Argentina_Cordoba ("<-03>3") -#define TZ_America_Argentina_Jujuy ("<-03>3") -#define TZ_America_Argentina_La_Rioja ("<-03>3") -#define TZ_America_Argentina_Mendoza ("<-03>3") -#define TZ_America_Argentina_Rio_Gallegos ("<-03>3") -#define TZ_America_Argentina_Salta ("<-03>3") -#define TZ_America_Argentina_San_Juan ("<-03>3") -#define TZ_America_Argentina_San_Luis ("<-03>3") -#define TZ_America_Argentina_Tucuman ("<-03>3") -#define TZ_America_Argentina_Ushuaia ("<-03>3") -#define TZ_America_Aruba ("AST4") -#define TZ_America_Asuncion ("<-04>4<-03>,M10.1.0/0,M3.4.0/0") -#define TZ_America_Atikokan ("EST5") -#define TZ_America_Bahia ("<-03>3") -#define TZ_America_Bahia_Banderas ("CST6CDT,M4.1.0,M10.5.0") -#define TZ_America_Barbados ("AST4") -#define TZ_America_Belem ("<-03>3") -#define TZ_America_Belize ("CST6") -#define TZ_America_BlancmSablon ("AST4") -#define TZ_America_Boa_Vista ("<-04>4") -#define TZ_America_Bogota ("<-05>5") -#define TZ_America_Boise ("MST7MDT,M3.2.0,M11.1.0") -#define TZ_America_Cambridge_Bay ("MST7MDT,M3.2.0,M11.1.0") -#define TZ_America_Campo_Grande ("<-04>4") -#define TZ_America_Cancun ("EST5") -#define TZ_America_Caracas ("<-04>4") -#define TZ_America_Cayenne ("<-03>3") -#define TZ_America_Cayman ("EST5") -#define TZ_America_Chicago ("CST6CDT,M3.2.0,M11.1.0") -#define TZ_America_Chihuahua ("MST7MDT,M4.1.0,M10.5.0") -#define TZ_America_Costa_Rica ("CST6") -#define TZ_America_Creston ("MST7") -#define TZ_America_Cuiaba ("<-04>4") -#define TZ_America_Curacao ("AST4") -#define TZ_America_Danmarkshavn ("GMT0") -#define TZ_America_Dawson ("MST7") -#define TZ_America_Dawson_Creek ("MST7") -#define TZ_America_Denver ("MST7MDT,M3.2.0,M11.1.0") -#define TZ_America_Detroit ("EST5EDT,M3.2.0,M11.1.0") -#define TZ_America_Dominica ("AST4") -#define TZ_America_Edmonton ("MST7MDT,M3.2.0,M11.1.0") -#define TZ_America_Eirunepe ("<-05>5") -#define TZ_America_El_Salvador ("CST6") -#define TZ_America_Fortaleza ("<-03>3") -#define TZ_America_Fort_Nelson ("MST7") -#define TZ_America_Glace_Bay ("AST4ADT,M3.2.0,M11.1.0") -#define TZ_America_Godthab ("<-03>3<-02>,M3.5.0/-2,M10.5.0/-1") -#define TZ_America_Goose_Bay ("AST4ADT,M3.2.0,M11.1.0") -#define TZ_America_Grand_Turk ("EST5EDT,M3.2.0,M11.1.0") -#define TZ_America_Grenada ("AST4") -#define TZ_America_Guadeloupe ("AST4") -#define TZ_America_Guatemala ("CST6") -#define TZ_America_Guayaquil ("<-05>5") -#define TZ_America_Guyana ("<-04>4") -#define TZ_America_Halifax ("AST4ADT,M3.2.0,M11.1.0") -#define TZ_America_Havana ("CST5CDT,M3.2.0/0,M11.1.0/1") -#define TZ_America_Hermosillo ("MST7") -#define TZ_America_Indiana_Indianapolis ("EST5EDT,M3.2.0,M11.1.0") -#define TZ_America_Indiana_Knox ("CST6CDT,M3.2.0,M11.1.0") -#define TZ_America_Indiana_Marengo ("EST5EDT,M3.2.0,M11.1.0") -#define TZ_America_Indiana_Petersburg ("EST5EDT,M3.2.0,M11.1.0") -#define TZ_America_Indiana_Tell_City ("CST6CDT,M3.2.0,M11.1.0") -#define TZ_America_Indiana_Vevay ("EST5EDT,M3.2.0,M11.1.0") -#define TZ_America_Indiana_Vincennes ("EST5EDT,M3.2.0,M11.1.0") -#define TZ_America_Indiana_Winamac ("EST5EDT,M3.2.0,M11.1.0") -#define TZ_America_Inuvik ("MST7MDT,M3.2.0,M11.1.0") -#define TZ_America_Iqaluit ("EST5EDT,M3.2.0,M11.1.0") -#define TZ_America_Jamaica ("EST5") -#define TZ_America_Juneau ("AKST9AKDT,M3.2.0,M11.1.0") -#define TZ_America_Kentucky_Louisville ("EST5EDT,M3.2.0,M11.1.0") -#define TZ_America_Kentucky_Monticello ("EST5EDT,M3.2.0,M11.1.0") -#define TZ_America_Kralendijk ("AST4") -#define TZ_America_La_Paz ("<-04>4") -#define TZ_America_Lima ("<-05>5") -#define TZ_America_Los_Angeles ("PST8PDT,M3.2.0,M11.1.0") -#define TZ_America_Lower_Princes ("AST4") -#define TZ_America_Maceio ("<-03>3") -#define TZ_America_Managua ("CST6") -#define TZ_America_Manaus ("<-04>4") -#define TZ_America_Marigot ("AST4") -#define TZ_America_Martinique ("AST4") -#define TZ_America_Matamoros ("CST6CDT,M3.2.0,M11.1.0") -#define TZ_America_Mazatlan ("MST7MDT,M4.1.0,M10.5.0") -#define TZ_America_Menominee ("CST6CDT,M3.2.0,M11.1.0") -#define TZ_America_Merida ("CST6CDT,M4.1.0,M10.5.0") -#define TZ_America_Metlakatla ("AKST9AKDT,M3.2.0,M11.1.0") -#define TZ_America_Mexico_City ("CST6CDT,M4.1.0,M10.5.0") -#define TZ_America_Miquelon ("<-03>3<-02>,M3.2.0,M11.1.0") -#define TZ_America_Moncton ("AST4ADT,M3.2.0,M11.1.0") -#define TZ_America_Monterrey ("CST6CDT,M4.1.0,M10.5.0") -#define TZ_America_Montevideo ("<-03>3") -#define TZ_America_Montreal ("EST5EDT,M3.2.0,M11.1.0") -#define TZ_America_Montserrat ("AST4") -#define TZ_America_Nassau ("EST5EDT,M3.2.0,M11.1.0") -#define TZ_America_New_York ("EST5EDT,M3.2.0,M11.1.0") -#define TZ_America_Nipigon ("EST5EDT,M3.2.0,M11.1.0") -#define TZ_America_Nome ("AKST9AKDT,M3.2.0,M11.1.0") -#define TZ_America_Noronha ("<-02>2") -#define TZ_America_North_Dakota_Beulah ("CST6CDT,M3.2.0,M11.1.0") -#define TZ_America_North_Dakota_Center ("CST6CDT,M3.2.0,M11.1.0") -#define TZ_America_North_Dakota_New_Salem ("CST6CDT,M3.2.0,M11.1.0") -#define TZ_America_Ojinaga ("MST7MDT,M3.2.0,M11.1.0") -#define TZ_America_Panama ("EST5") -#define TZ_America_Pangnirtung ("EST5EDT,M3.2.0,M11.1.0") -#define TZ_America_Paramaribo ("<-03>3") -#define TZ_America_Phoenix ("MST7") -#define TZ_America_PortmaumPrince ("EST5EDT,M3.2.0,M11.1.0") -#define TZ_America_Port_of_Spain ("AST4") -#define TZ_America_Porto_Velho ("<-04>4") -#define TZ_America_Puerto_Rico ("AST4") -#define TZ_America_Punta_Arenas ("<-03>3") -#define TZ_America_Rainy_River ("CST6CDT,M3.2.0,M11.1.0") -#define TZ_America_Rankin_Inlet ("CST6CDT,M3.2.0,M11.1.0") -#define TZ_America_Recife ("<-03>3") -#define TZ_America_Regina ("CST6") -#define TZ_America_Resolute ("CST6CDT,M3.2.0,M11.1.0") -#define TZ_America_Rio_Branco ("<-05>5") -#define TZ_America_Santarem ("<-03>3") -#define TZ_America_Santiago ("<-04>4<-03>,M9.1.6/24,M4.1.6/24") -#define TZ_America_Santo_Domingo ("AST4") -#define TZ_America_Sao_Paulo ("<-03>3") -#define TZ_America_Scoresbysund ("<-01>1<+00>,M3.5.0/0,M10.5.0/1") -#define TZ_America_Sitka ("AKST9AKDT,M3.2.0,M11.1.0") -#define TZ_America_St_Barthelemy ("AST4") -#define TZ_America_St_Johns ("NST3:30NDT,M3.2.0,M11.1.0") -#define TZ_America_St_Kitts ("AST4") -#define TZ_America_St_Lucia ("AST4") -#define TZ_America_St_Thomas ("AST4") -#define TZ_America_St_Vincent ("AST4") -#define TZ_America_Swift_Current ("CST6") -#define TZ_America_Tegucigalpa ("CST6") -#define TZ_America_Thule ("AST4ADT,M3.2.0,M11.1.0") -#define TZ_America_Thunder_Bay ("EST5EDT,M3.2.0,M11.1.0") -#define TZ_America_Tijuana ("PST8PDT,M3.2.0,M11.1.0") -#define TZ_America_Toronto ("EST5EDT,M3.2.0,M11.1.0") -#define TZ_America_Tortola ("AST4") -#define TZ_America_Vancouver ("PST8PDT,M3.2.0,M11.1.0") -#define TZ_America_Whitehorse ("MST7") -#define TZ_America_Winnipeg ("CST6CDT,M3.2.0,M11.1.0") -#define TZ_America_Yakutat ("AKST9AKDT,M3.2.0,M11.1.0") -#define TZ_America_Yellowknife ("MST7MDT,M3.2.0,M11.1.0") -#define TZ_Antarctica_Casey ("<+11>-11") -#define TZ_Antarctica_Davis ("<+07>-7") -#define TZ_Antarctica_DumontDUrville ("<+10>-10") -#define TZ_Antarctica_Macquarie ("AEST-10AEDT,M10.1.0,M4.1.0/3") -#define TZ_Antarctica_Mawson ("<+05>-5") -#define TZ_Antarctica_McMurdo ("NZST-12NZDT,M9.5.0,M4.1.0/3") -#define TZ_Antarctica_Palmer ("<-03>3") -#define TZ_Antarctica_Rothera ("<-03>3") -#define TZ_Antarctica_Syowa ("<+03>-3") -#define TZ_Antarctica_Troll ("<+00>0<+02>-2,M3.5.0/1,M10.5.0/3") -#define TZ_Antarctica_Vostok ("<+06>-6") -#define TZ_Arctic_Longyearbyen ("CET-1CEST,M3.5.0,M10.5.0/3") -#define TZ_Asia_Aden ("<+03>-3") -#define TZ_Asia_Almaty ("<+06>-6") -#define TZ_Asia_Amman ("EET-2EEST,M3.5.4/24,M10.5.5/1") -#define TZ_Asia_Anadyr ("<+12>-12") -#define TZ_Asia_Aqtau ("<+05>-5") -#define TZ_Asia_Aqtobe ("<+05>-5") -#define TZ_Asia_Ashgabat ("<+05>-5") -#define TZ_Asia_Atyrau ("<+05>-5") -#define TZ_Asia_Baghdad ("<+03>-3") -#define TZ_Asia_Bahrain ("<+03>-3") -#define TZ_Asia_Baku ("<+04>-4") -#define TZ_Asia_Bangkok ("<+07>-7") -#define TZ_Asia_Barnaul ("<+07>-7") -#define TZ_Asia_Beirut ("EET-2EEST,M3.5.0/0,M10.5.0/0") -#define TZ_Asia_Bishkek ("<+06>-6") -#define TZ_Asia_Brunei ("<+08>-8") -#define TZ_Asia_Chita ("<+09>-9") -#define TZ_Asia_Choibalsan ("<+08>-8") -#define TZ_Asia_Colombo ("<+0530>-5:30") -#define TZ_Asia_Damascus ("EET-2EEST,M3.5.5/0,M10.5.5/0") -#define TZ_Asia_Dhaka ("<+06>-6") -#define TZ_Asia_Dili ("<+09>-9") -#define TZ_Asia_Dubai ("<+04>-4") -#define TZ_Asia_Dushanbe ("<+05>-5") -#define TZ_Asia_Famagusta ("EET-2EEST,M3.5.0/3,M10.5.0/4") -#define TZ_Asia_Gaza ("EET-2EEST,M3.4.4/48,M10.4.4/49") -#define TZ_Asia_Hebron ("EET-2EEST,M3.4.4/48,M10.4.4/49") -#define TZ_Asia_Ho_Chi_Minh ("<+07>-7") -#define TZ_Asia_Hong_Kong ("HKT-8") -#define TZ_Asia_Hovd ("<+07>-7") -#define TZ_Asia_Irkutsk ("<+08>-8") -#define TZ_Asia_Jakarta ("WIB-7") -#define TZ_Asia_Jayapura ("WIT-9") -#define TZ_Asia_Jerusalem ("IST-2IDT,M3.4.4/26,M10.5.0") -#define TZ_Asia_Kabul ("<+0430>-4:30") -#define TZ_Asia_Kamchatka ("<+12>-12") -#define TZ_Asia_Karachi ("PKT-5") -#define TZ_Asia_Kathmandu ("<+0545>-5:45") -#define TZ_Asia_Khandyga ("<+09>-9") -#define TZ_Asia_Kolkata ("IST-5:30") -#define TZ_Asia_Krasnoyarsk ("<+07>-7") -#define TZ_Asia_Kuala_Lumpur ("<+08>-8") -#define TZ_Asia_Kuching ("<+08>-8") -#define TZ_Asia_Kuwait ("<+03>-3") -#define TZ_Asia_Macau ("CST-8") -#define TZ_Asia_Magadan ("<+11>-11") -#define TZ_Asia_Makassar ("WITA-8") -#define TZ_Asia_Manila ("PST-8") -#define TZ_Asia_Muscat ("<+04>-4") -#define TZ_Asia_Nicosia ("EET-2EEST,M3.5.0/3,M10.5.0/4") -#define TZ_Asia_Novokuznetsk ("<+07>-7") -#define TZ_Asia_Novosibirsk ("<+07>-7") -#define TZ_Asia_Omsk ("<+06>-6") -#define TZ_Asia_Oral ("<+05>-5") -#define TZ_Asia_Phnom_Penh ("<+07>-7") -#define TZ_Asia_Pontianak ("WIB-7") -#define TZ_Asia_Pyongyang ("KST-9") -#define TZ_Asia_Qatar ("<+03>-3") -#define TZ_Asia_Qyzylorda ("<+05>-5") -#define TZ_Asia_Riyadh ("<+03>-3") -#define TZ_Asia_Sakhalin ("<+11>-11") -#define TZ_Asia_Samarkand ("<+05>-5") -#define TZ_Asia_Seoul ("KST-9") -#define TZ_Asia_Shanghai ("CST-8") -#define TZ_Asia_Singapore ("<+08>-8") -#define TZ_Asia_Srednekolymsk ("<+11>-11") -#define TZ_Asia_Taipei ("CST-8") -#define TZ_Asia_Tashkent ("<+05>-5") -#define TZ_Asia_Tbilisi ("<+04>-4") -#define TZ_Asia_Tehran ("<+0330>-3:30<+0430>,J79/24,J263/24") -#define TZ_Asia_Thimphu ("<+06>-6") -#define TZ_Asia_Tokyo ("JST-9") -#define TZ_Asia_Tomsk ("<+07>-7") -#define TZ_Asia_Ulaanbaatar ("<+08>-8") -#define TZ_Asia_Urumqi ("<+06>-6") -#define TZ_Asia_UstmNera ("<+10>-10") -#define TZ_Asia_Vientiane ("<+07>-7") -#define TZ_Asia_Vladivostok ("<+10>-10") -#define TZ_Asia_Yakutsk ("<+09>-9") -#define TZ_Asia_Yangon ("<+0630>-6:30") -#define TZ_Asia_Yekaterinburg ("<+05>-5") -#define TZ_Asia_Yerevan ("<+04>-4") -#define TZ_Atlantic_Azores ("<-01>1<+00>,M3.5.0/0,M10.5.0/1") -#define TZ_Atlantic_Bermuda ("AST4ADT,M3.2.0,M11.1.0") -#define TZ_Atlantic_Canary ("WET0WEST,M3.5.0/1,M10.5.0") -#define TZ_Atlantic_Cape_Verde ("<-01>1") -#define TZ_Atlantic_Faroe ("WET0WEST,M3.5.0/1,M10.5.0") -#define TZ_Atlantic_Madeira ("WET0WEST,M3.5.0/1,M10.5.0") -#define TZ_Atlantic_Reykjavik ("GMT0") -#define TZ_Atlantic_South_Georgia ("<-02>2") -#define TZ_Atlantic_Stanley ("<-03>3") -#define TZ_Atlantic_St_Helena ("GMT0") -#define TZ_Australia_Adelaide ("ACST-9:30ACDT,M10.1.0,M4.1.0/3") -#define TZ_Australia_Brisbane ("AEST-10") -#define TZ_Australia_Broken_Hill ("ACST-9:30ACDT,M10.1.0,M4.1.0/3") -#define TZ_Australia_Currie ("AEST-10AEDT,M10.1.0,M4.1.0/3") -#define TZ_Australia_Darwin ("ACST-9:30") -#define TZ_Australia_Eucla ("<+0845>-8:45") -#define TZ_Australia_Hobart ("AEST-10AEDT,M10.1.0,M4.1.0/3") -#define TZ_Australia_Lindeman ("AEST-10") -#define TZ_Australia_Lord_Howe ("<+1030>-10:30<+11>-11,M10.1.0,M4.1.0") -#define TZ_Australia_Melbourne ("AEST-10AEDT,M10.1.0,M4.1.0/3") -#define TZ_Australia_Perth ("AWST-8") -#define TZ_Australia_Sydney ("AEST-10AEDT,M10.1.0,M4.1.0/3") -#define TZ_Europe_Amsterdam ("CET-1CEST,M3.5.0,M10.5.0/3") -#define TZ_Europe_Andorra ("CET-1CEST,M3.5.0,M10.5.0/3") -#define TZ_Europe_Astrakhan ("<+04>-4") -#define TZ_Europe_Athens ("EET-2EEST,M3.5.0/3,M10.5.0/4") -#define TZ_Europe_Belgrade ("CET-1CEST,M3.5.0,M10.5.0/3") -#define TZ_Europe_Berlin ("CET-1CEST,M3.5.0,M10.5.0/3") -#define TZ_Europe_Bratislava ("CET-1CEST,M3.5.0,M10.5.0/3") -#define TZ_Europe_Brussels ("CET-1CEST,M3.5.0,M10.5.0/3") -#define TZ_Europe_Bucharest ("EET-2EEST,M3.5.0/3,M10.5.0/4") -#define TZ_Europe_Budapest ("CET-1CEST,M3.5.0,M10.5.0/3") -#define TZ_Europe_Busingen ("CET-1CEST,M3.5.0,M10.5.0/3") -#define TZ_Europe_Chisinau ("EET-2EEST,M3.5.0,M10.5.0/3") -#define TZ_Europe_Copenhagen ("CET-1CEST,M3.5.0,M10.5.0/3") -#define TZ_Europe_Dublin ("IST-1GMT0,M10.5.0,M3.5.0/1") -#define TZ_Europe_Gibraltar ("CET-1CEST,M3.5.0,M10.5.0/3") -#define TZ_Europe_Guernsey ("GMT0BST,M3.5.0/1,M10.5.0") -#define TZ_Europe_Helsinki ("EET-2EEST,M3.5.0/3,M10.5.0/4") -#define TZ_Europe_Isle_of_Man ("GMT0BST,M3.5.0/1,M10.5.0") -#define TZ_Europe_Istanbul ("<+03>-3") -#define TZ_Europe_Jersey ("GMT0BST,M3.5.0/1,M10.5.0") -#define TZ_Europe_Kaliningrad ("EET-2") -#define TZ_Europe_Kiev ("EET-2EEST,M3.5.0/3,M10.5.0/4") -#define TZ_Europe_Kirov ("<+03>-3") -#define TZ_Europe_Lisbon ("WET0WEST,M3.5.0/1,M10.5.0") -#define TZ_Europe_Ljubljana ("CET-1CEST,M3.5.0,M10.5.0/3") -#define TZ_Europe_London ("GMT0BST,M3.5.0/1,M10.5.0") -#define TZ_Europe_Luxembourg ("CET-1CEST,M3.5.0,M10.5.0/3") -#define TZ_Europe_Madrid ("CET-1CEST,M3.5.0,M10.5.0/3") -#define TZ_Europe_Malta ("CET-1CEST,M3.5.0,M10.5.0/3") -#define TZ_Europe_Mariehamn ("EET-2EEST,M3.5.0/3,M10.5.0/4") -#define TZ_Europe_Minsk ("<+03>-3") -#define TZ_Europe_Monaco ("CET-1CEST,M3.5.0,M10.5.0/3") -#define TZ_Europe_Moscow ("MSK-3") -#define TZ_Europe_Oslo ("CET-1CEST,M3.5.0,M10.5.0/3") -#define TZ_Europe_Paris ("CET-1CEST,M3.5.0,M10.5.0/3") -#define TZ_Europe_Podgorica ("CET-1CEST,M3.5.0,M10.5.0/3") -#define TZ_Europe_Prague ("CET-1CEST,M3.5.0,M10.5.0/3") -#define TZ_Europe_Riga ("EET-2EEST,M3.5.0/3,M10.5.0/4") -#define TZ_Europe_Rome ("CET-1CEST,M3.5.0,M10.5.0/3") -#define TZ_Europe_Samara ("<+04>-4") -#define TZ_Europe_San_Marino ("CET-1CEST,M3.5.0,M10.5.0/3") -#define TZ_Europe_Sarajevo ("CET-1CEST,M3.5.0,M10.5.0/3") -#define TZ_Europe_Saratov ("<+04>-4") -#define TZ_Europe_Simferopol ("MSK-3") -#define TZ_Europe_Skopje ("CET-1CEST,M3.5.0,M10.5.0/3") -#define TZ_Europe_Sofia ("EET-2EEST,M3.5.0/3,M10.5.0/4") -#define TZ_Europe_Stockholm ("CET-1CEST,M3.5.0,M10.5.0/3") -#define TZ_Europe_Tallinn ("EET-2EEST,M3.5.0/3,M10.5.0/4") -#define TZ_Europe_Tirane ("CET-1CEST,M3.5.0,M10.5.0/3") -#define TZ_Europe_Ulyanovsk ("<+04>-4") -#define TZ_Europe_Uzhgorod ("EET-2EEST,M3.5.0/3,M10.5.0/4") -#define TZ_Europe_Vaduz ("CET-1CEST,M3.5.0,M10.5.0/3") -#define TZ_Europe_Vatican ("CET-1CEST,M3.5.0,M10.5.0/3") -#define TZ_Europe_Vienna ("CET-1CEST,M3.5.0,M10.5.0/3") -#define TZ_Europe_Vilnius ("EET-2EEST,M3.5.0/3,M10.5.0/4") -#define TZ_Europe_Volgograd ("<+04>-4") -#define TZ_Europe_Warsaw ("CET-1CEST,M3.5.0,M10.5.0/3") -#define TZ_Europe_Zagreb ("CET-1CEST,M3.5.0,M10.5.0/3") -#define TZ_Europe_Zaporozhye ("EET-2EEST,M3.5.0/3,M10.5.0/4") -#define TZ_Europe_Zurich ("CET-1CEST,M3.5.0,M10.5.0/3") -#define TZ_Indian_Antananarivo ("EAT-3") -#define TZ_Indian_Chagos ("<+06>-6") -#define TZ_Indian_Christmas ("<+07>-7") -#define TZ_Indian_Cocos ("<+0630>-6:30") -#define TZ_Indian_Comoro ("EAT-3") -#define TZ_Indian_Kerguelen ("<+05>-5") -#define TZ_Indian_Mahe ("<+04>-4") -#define TZ_Indian_Maldives ("<+05>-5") -#define TZ_Indian_Mauritius ("<+04>-4") -#define TZ_Indian_Mayotte ("EAT-3") -#define TZ_Indian_Reunion ("<+04>-4") -#define TZ_Pacific_Apia ("<+13>-13<+14>,M9.5.0/3,M4.1.0/4") -#define TZ_Pacific_Auckland ("NZST-12NZDT,M9.5.0,M4.1.0/3") -#define TZ_Pacific_Bougainville ("<+11>-11") -#define TZ_Pacific_Chatham ("<+1245>-12:45<+1345>,M9.5.0/2:45,M4.1.0/3:45") -#define TZ_Pacific_Chuuk ("<+10>-10") -#define TZ_Pacific_Easter ("<-06>6<-05>,M9.1.6/22,M4.1.6/22") -#define TZ_Pacific_Efate ("<+11>-11") -#define TZ_Pacific_Enderbury ("<+13>-13") -#define TZ_Pacific_Fakaofo ("<+13>-13") -#define TZ_Pacific_Fiji ("<+12>-12<+13>,M11.2.0,M1.2.3/99") -#define TZ_Pacific_Funafuti ("<+12>-12") -#define TZ_Pacific_Galapagos ("<-06>6") -#define TZ_Pacific_Gambier ("<-09>9") -#define TZ_Pacific_Guadalcanal ("<+11>-11") -#define TZ_Pacific_Guam ("ChST-10") -#define TZ_Pacific_Honolulu ("HST10") -#define TZ_Pacific_Kiritimati ("<+14>-14") -#define TZ_Pacific_Kosrae ("<+11>-11") -#define TZ_Pacific_Kwajalein ("<+12>-12") -#define TZ_Pacific_Majuro ("<+12>-12") -#define TZ_Pacific_Marquesas ("<-0930>9:30") -#define TZ_Pacific_Midway ("SST11") -#define TZ_Pacific_Nauru ("<+12>-12") -#define TZ_Pacific_Niue ("<-11>11") -#define TZ_Pacific_Norfolk ("<+11>-11<+12>,M10.1.0,M4.1.0/3") -#define TZ_Pacific_Noumea ("<+11>-11") -#define TZ_Pacific_Pago_Pago ("SST11") -#define TZ_Pacific_Palau ("<+09>-9") -#define TZ_Pacific_Pitcairn ("<-08>8") -#define TZ_Pacific_Pohnpei ("<+11>-11") -#define TZ_Pacific_Port_Moresby ("<+10>-10") -#define TZ_Pacific_Rarotonga ("<-10>10") -#define TZ_Pacific_Saipan ("ChST-10") -#define TZ_Pacific_Tahiti ("<-10>10") -#define TZ_Pacific_Tarawa ("<+12>-12") -#define TZ_Pacific_Tongatapu ("<+13>-13") -#define TZ_Pacific_Wake ("<+12>-12") -#define TZ_Pacific_Wallis ("<+12>-12") -#define TZ_Etc_GMT ("GMT0") -#define TZ_Etc_GMTm0 ("GMT0") -#define TZ_Etc_GMTm1 ("<+01>-1") -#define TZ_Etc_GMTm2 ("<+02>-2") -#define TZ_Etc_GMTm3 ("<+03>-3") -#define TZ_Etc_GMTm4 ("<+04>-4") -#define TZ_Etc_GMTm5 ("<+05>-5") -#define TZ_Etc_GMTm6 ("<+06>-6") -#define TZ_Etc_GMTm7 ("<+07>-7") -#define TZ_Etc_GMTm8 ("<+08>-8") -#define TZ_Etc_GMTm9 ("<+09>-9") -#define TZ_Etc_GMTm10 ("<+10>-10") -#define TZ_Etc_GMTm11 ("<+11>-11") -#define TZ_Etc_GMTm12 ("<+12>-12") -#define TZ_Etc_GMTm13 ("<+13>-13") -#define TZ_Etc_GMTm14 ("<+14>-14") -#define TZ_Etc_GMT0 ("GMT0") -#define TZ_Etc_GMTp0 ("GMT0") -#define TZ_Etc_GMTp1 ("<-01>1") -#define TZ_Etc_GMTp2 ("<-02>2") -#define TZ_Etc_GMTp3 ("<-03>3") -#define TZ_Etc_GMTp4 ("<-04>4") -#define TZ_Etc_GMTp5 ("<-05>5") -#define TZ_Etc_GMTp6 ("<-06>6") -#define TZ_Etc_GMTp7 ("<-07>7") -#define TZ_Etc_GMTp8 ("<-08>8") -#define TZ_Etc_GMTp9 ("<-09>9") -#define TZ_Etc_GMTp10 ("<-10>10") -#define TZ_Etc_GMTp11 ("<-11>11") -#define TZ_Etc_GMTp12 ("<-12>12") -#define TZ_Etc_UCT ("UTC0") -#define TZ_Etc_UTC ("UTC0") -#define TZ_Etc_Greenwich ("GMT0") -#define TZ_Etc_Universal ("UTC0") -#define TZ_Etc_Zulu ("UTC0") +#define TZ_Africa_Abidjan ("GMT0") +#define TZ_Africa_Accra ("GMT0") +#define TZ_Africa_Addis_Ababa ("EAT-3") +#define TZ_Africa_Algiers ("CET-1") +#define TZ_Africa_Asmara ("EAT-3") +#define TZ_Africa_Bamako ("GMT0") +#define TZ_Africa_Bangui ("WAT-1") +#define TZ_Africa_Banjul ("GMT0") +#define TZ_Africa_Bissau ("GMT0") +#define TZ_Africa_Blantyre ("CAT-2") +#define TZ_Africa_Brazzaville ("WAT-1") +#define TZ_Africa_Bujumbura ("CAT-2") +#define TZ_Africa_Cairo ("EET-2") +#define TZ_Africa_Casablanca ("<+01>-1") +#define TZ_Africa_Ceuta ("CET-1CEST,M3.5.0,M10.5.0/3") +#define TZ_Africa_Conakry ("GMT0") +#define TZ_Africa_Dakar ("GMT0") +#define TZ_Africa_Dar_es_Salaam ("EAT-3") +#define TZ_Africa_Djibouti ("EAT-3") +#define TZ_Africa_Douala ("WAT-1") +#define TZ_Africa_El_Aaiun ("<+01>-1") +#define TZ_Africa_Freetown ("GMT0") +#define TZ_Africa_Gaborone ("CAT-2") +#define TZ_Africa_Harare ("CAT-2") +#define TZ_Africa_Johannesburg ("SAST-2") +#define TZ_Africa_Juba ("EAT-3") +#define TZ_Africa_Kampala ("EAT-3") +#define TZ_Africa_Khartoum ("CAT-2") +#define TZ_Africa_Kigali ("CAT-2") +#define TZ_Africa_Kinshasa ("WAT-1") +#define TZ_Africa_Lagos ("WAT-1") +#define TZ_Africa_Libreville ("WAT-1") +#define TZ_Africa_Lome ("GMT0") +#define TZ_Africa_Luanda ("WAT-1") +#define TZ_Africa_Lubumbashi ("CAT-2") +#define TZ_Africa_Lusaka ("CAT-2") +#define TZ_Africa_Malabo ("WAT-1") +#define TZ_Africa_Maputo ("CAT-2") +#define TZ_Africa_Maseru ("SAST-2") +#define TZ_Africa_Mbabane ("SAST-2") +#define TZ_Africa_Mogadishu ("EAT-3") +#define TZ_Africa_Monrovia ("GMT0") +#define TZ_Africa_Nairobi ("EAT-3") +#define TZ_Africa_Ndjamena ("WAT-1") +#define TZ_Africa_Niamey ("WAT-1") +#define TZ_Africa_Nouakchott ("GMT0") +#define TZ_Africa_Ouagadougou ("GMT0") +#define TZ_Africa_PortomNovo ("WAT-1") +#define TZ_Africa_Sao_Tome ("GMT0") +#define TZ_Africa_Tripoli ("EET-2") +#define TZ_Africa_Tunis ("CET-1") +#define TZ_Africa_Windhoek ("CAT-2") +#define TZ_America_Adak ("HST10HDT,M3.2.0,M11.1.0") +#define TZ_America_Anchorage ("AKST9AKDT,M3.2.0,M11.1.0") +#define TZ_America_Anguilla ("AST4") +#define TZ_America_Antigua ("AST4") +#define TZ_America_Araguaina ("<-03>3") +#define TZ_America_Argentina_Buenos_Aires ("<-03>3") +#define TZ_America_Argentina_Catamarca ("<-03>3") +#define TZ_America_Argentina_Cordoba ("<-03>3") +#define TZ_America_Argentina_Jujuy ("<-03>3") +#define TZ_America_Argentina_La_Rioja ("<-03>3") +#define TZ_America_Argentina_Mendoza ("<-03>3") +#define TZ_America_Argentina_Rio_Gallegos ("<-03>3") +#define TZ_America_Argentina_Salta ("<-03>3") +#define TZ_America_Argentina_San_Juan ("<-03>3") +#define TZ_America_Argentina_San_Luis ("<-03>3") +#define TZ_America_Argentina_Tucuman ("<-03>3") +#define TZ_America_Argentina_Ushuaia ("<-03>3") +#define TZ_America_Aruba ("AST4") +#define TZ_America_Asuncion ("<-04>4<-03>,M10.1.0/0,M3.4.0/0") +#define TZ_America_Atikokan ("EST5") +#define TZ_America_Bahia ("<-03>3") +#define TZ_America_Bahia_Banderas ("CST6CDT,M4.1.0,M10.5.0") +#define TZ_America_Barbados ("AST4") +#define TZ_America_Belem ("<-03>3") +#define TZ_America_Belize ("CST6") +#define TZ_America_BlancmSablon ("AST4") +#define TZ_America_Boa_Vista ("<-04>4") +#define TZ_America_Bogota ("<-05>5") +#define TZ_America_Boise ("MST7MDT,M3.2.0,M11.1.0") +#define TZ_America_Cambridge_Bay ("MST7MDT,M3.2.0,M11.1.0") +#define TZ_America_Campo_Grande ("<-04>4") +#define TZ_America_Cancun ("EST5") +#define TZ_America_Caracas ("<-04>4") +#define TZ_America_Cayenne ("<-03>3") +#define TZ_America_Cayman ("EST5") +#define TZ_America_Chicago ("CST6CDT,M3.2.0,M11.1.0") +#define TZ_America_Chihuahua ("MST7MDT,M4.1.0,M10.5.0") +#define TZ_America_Costa_Rica ("CST6") +#define TZ_America_Creston ("MST7") +#define TZ_America_Cuiaba ("<-04>4") +#define TZ_America_Curacao ("AST4") +#define TZ_America_Danmarkshavn ("GMT0") +#define TZ_America_Dawson ("MST7") +#define TZ_America_Dawson_Creek ("MST7") +#define TZ_America_Denver ("MST7MDT,M3.2.0,M11.1.0") +#define TZ_America_Detroit ("EST5EDT,M3.2.0,M11.1.0") +#define TZ_America_Dominica ("AST4") +#define TZ_America_Edmonton ("MST7MDT,M3.2.0,M11.1.0") +#define TZ_America_Eirunepe ("<-05>5") +#define TZ_America_El_Salvador ("CST6") +#define TZ_America_Fortaleza ("<-03>3") +#define TZ_America_Fort_Nelson ("MST7") +#define TZ_America_Glace_Bay ("AST4ADT,M3.2.0,M11.1.0") +#define TZ_America_Godthab ("<-03>3<-02>,M3.5.0/-2,M10.5.0/-1") +#define TZ_America_Goose_Bay ("AST4ADT,M3.2.0,M11.1.0") +#define TZ_America_Grand_Turk ("EST5EDT,M3.2.0,M11.1.0") +#define TZ_America_Grenada ("AST4") +#define TZ_America_Guadeloupe ("AST4") +#define TZ_America_Guatemala ("CST6") +#define TZ_America_Guayaquil ("<-05>5") +#define TZ_America_Guyana ("<-04>4") +#define TZ_America_Halifax ("AST4ADT,M3.2.0,M11.1.0") +#define TZ_America_Havana ("CST5CDT,M3.2.0/0,M11.1.0/1") +#define TZ_America_Hermosillo ("MST7") +#define TZ_America_Indiana_Indianapolis ("EST5EDT,M3.2.0,M11.1.0") +#define TZ_America_Indiana_Knox ("CST6CDT,M3.2.0,M11.1.0") +#define TZ_America_Indiana_Marengo ("EST5EDT,M3.2.0,M11.1.0") +#define TZ_America_Indiana_Petersburg ("EST5EDT,M3.2.0,M11.1.0") +#define TZ_America_Indiana_Tell_City ("CST6CDT,M3.2.0,M11.1.0") +#define TZ_America_Indiana_Vevay ("EST5EDT,M3.2.0,M11.1.0") +#define TZ_America_Indiana_Vincennes ("EST5EDT,M3.2.0,M11.1.0") +#define TZ_America_Indiana_Winamac ("EST5EDT,M3.2.0,M11.1.0") +#define TZ_America_Inuvik ("MST7MDT,M3.2.0,M11.1.0") +#define TZ_America_Iqaluit ("EST5EDT,M3.2.0,M11.1.0") +#define TZ_America_Jamaica ("EST5") +#define TZ_America_Juneau ("AKST9AKDT,M3.2.0,M11.1.0") +#define TZ_America_Kentucky_Louisville ("EST5EDT,M3.2.0,M11.1.0") +#define TZ_America_Kentucky_Monticello ("EST5EDT,M3.2.0,M11.1.0") +#define TZ_America_Kralendijk ("AST4") +#define TZ_America_La_Paz ("<-04>4") +#define TZ_America_Lima ("<-05>5") +#define TZ_America_Los_Angeles ("PST8PDT,M3.2.0,M11.1.0") +#define TZ_America_Lower_Princes ("AST4") +#define TZ_America_Maceio ("<-03>3") +#define TZ_America_Managua ("CST6") +#define TZ_America_Manaus ("<-04>4") +#define TZ_America_Marigot ("AST4") +#define TZ_America_Martinique ("AST4") +#define TZ_America_Matamoros ("CST6CDT,M3.2.0,M11.1.0") +#define TZ_America_Mazatlan ("MST7MDT,M4.1.0,M10.5.0") +#define TZ_America_Menominee ("CST6CDT,M3.2.0,M11.1.0") +#define TZ_America_Merida ("CST6CDT,M4.1.0,M10.5.0") +#define TZ_America_Metlakatla ("AKST9AKDT,M3.2.0,M11.1.0") +#define TZ_America_Mexico_City ("CST6CDT,M4.1.0,M10.5.0") +#define TZ_America_Miquelon ("<-03>3<-02>,M3.2.0,M11.1.0") +#define TZ_America_Moncton ("AST4ADT,M3.2.0,M11.1.0") +#define TZ_America_Monterrey ("CST6CDT,M4.1.0,M10.5.0") +#define TZ_America_Montevideo ("<-03>3") +#define TZ_America_Montreal ("EST5EDT,M3.2.0,M11.1.0") +#define TZ_America_Montserrat ("AST4") +#define TZ_America_Nassau ("EST5EDT,M3.2.0,M11.1.0") +#define TZ_America_New_York ("EST5EDT,M3.2.0,M11.1.0") +#define TZ_America_Nipigon ("EST5EDT,M3.2.0,M11.1.0") +#define TZ_America_Nome ("AKST9AKDT,M3.2.0,M11.1.0") +#define TZ_America_Noronha ("<-02>2") +#define TZ_America_North_Dakota_Beulah ("CST6CDT,M3.2.0,M11.1.0") +#define TZ_America_North_Dakota_Center ("CST6CDT,M3.2.0,M11.1.0") +#define TZ_America_North_Dakota_New_Salem ("CST6CDT,M3.2.0,M11.1.0") +#define TZ_America_Ojinaga ("MST7MDT,M3.2.0,M11.1.0") +#define TZ_America_Panama ("EST5") +#define TZ_America_Pangnirtung ("EST5EDT,M3.2.0,M11.1.0") +#define TZ_America_Paramaribo ("<-03>3") +#define TZ_America_Phoenix ("MST7") +#define TZ_America_PortmaumPrince ("EST5EDT,M3.2.0,M11.1.0") +#define TZ_America_Port_of_Spain ("AST4") +#define TZ_America_Porto_Velho ("<-04>4") +#define TZ_America_Puerto_Rico ("AST4") +#define TZ_America_Punta_Arenas ("<-03>3") +#define TZ_America_Rainy_River ("CST6CDT,M3.2.0,M11.1.0") +#define TZ_America_Rankin_Inlet ("CST6CDT,M3.2.0,M11.1.0") +#define TZ_America_Recife ("<-03>3") +#define TZ_America_Regina ("CST6") +#define TZ_America_Resolute ("CST6CDT,M3.2.0,M11.1.0") +#define TZ_America_Rio_Branco ("<-05>5") +#define TZ_America_Santarem ("<-03>3") +#define TZ_America_Santiago ("<-04>4<-03>,M9.1.6/24,M4.1.6/24") +#define TZ_America_Santo_Domingo ("AST4") +#define TZ_America_Sao_Paulo ("<-03>3") +#define TZ_America_Scoresbysund ("<-01>1<+00>,M3.5.0/0,M10.5.0/1") +#define TZ_America_Sitka ("AKST9AKDT,M3.2.0,M11.1.0") +#define TZ_America_St_Barthelemy ("AST4") +#define TZ_America_St_Johns ("NST3:30NDT,M3.2.0,M11.1.0") +#define TZ_America_St_Kitts ("AST4") +#define TZ_America_St_Lucia ("AST4") +#define TZ_America_St_Thomas ("AST4") +#define TZ_America_St_Vincent ("AST4") +#define TZ_America_Swift_Current ("CST6") +#define TZ_America_Tegucigalpa ("CST6") +#define TZ_America_Thule ("AST4ADT,M3.2.0,M11.1.0") +#define TZ_America_Thunder_Bay ("EST5EDT,M3.2.0,M11.1.0") +#define TZ_America_Tijuana ("PST8PDT,M3.2.0,M11.1.0") +#define TZ_America_Toronto ("EST5EDT,M3.2.0,M11.1.0") +#define TZ_America_Tortola ("AST4") +#define TZ_America_Vancouver ("PST8PDT,M3.2.0,M11.1.0") +#define TZ_America_Whitehorse ("MST7") +#define TZ_America_Winnipeg ("CST6CDT,M3.2.0,M11.1.0") +#define TZ_America_Yakutat ("AKST9AKDT,M3.2.0,M11.1.0") +#define TZ_America_Yellowknife ("MST7MDT,M3.2.0,M11.1.0") +#define TZ_Antarctica_Casey ("<+11>-11") +#define TZ_Antarctica_Davis ("<+07>-7") +#define TZ_Antarctica_DumontDUrville ("<+10>-10") +#define TZ_Antarctica_Macquarie ("AEST-10AEDT,M10.1.0,M4.1.0/3") +#define TZ_Antarctica_Mawson ("<+05>-5") +#define TZ_Antarctica_McMurdo ("NZST-12NZDT,M9.5.0,M4.1.0/3") +#define TZ_Antarctica_Palmer ("<-03>3") +#define TZ_Antarctica_Rothera ("<-03>3") +#define TZ_Antarctica_Syowa ("<+03>-3") +#define TZ_Antarctica_Troll ("<+00>0<+02>-2,M3.5.0/1,M10.5.0/3") +#define TZ_Antarctica_Vostok ("<+06>-6") +#define TZ_Arctic_Longyearbyen ("CET-1CEST,M3.5.0,M10.5.0/3") +#define TZ_Asia_Aden ("<+03>-3") +#define TZ_Asia_Almaty ("<+06>-6") +#define TZ_Asia_Amman ("EET-2EEST,M3.5.4/24,M10.5.5/1") +#define TZ_Asia_Anadyr ("<+12>-12") +#define TZ_Asia_Aqtau ("<+05>-5") +#define TZ_Asia_Aqtobe ("<+05>-5") +#define TZ_Asia_Ashgabat ("<+05>-5") +#define TZ_Asia_Atyrau ("<+05>-5") +#define TZ_Asia_Baghdad ("<+03>-3") +#define TZ_Asia_Bahrain ("<+03>-3") +#define TZ_Asia_Baku ("<+04>-4") +#define TZ_Asia_Bangkok ("<+07>-7") +#define TZ_Asia_Barnaul ("<+07>-7") +#define TZ_Asia_Beirut ("EET-2EEST,M3.5.0/0,M10.5.0/0") +#define TZ_Asia_Bishkek ("<+06>-6") +#define TZ_Asia_Brunei ("<+08>-8") +#define TZ_Asia_Chita ("<+09>-9") +#define TZ_Asia_Choibalsan ("<+08>-8") +#define TZ_Asia_Colombo ("<+0530>-5:30") +#define TZ_Asia_Damascus ("EET-2EEST,M3.5.5/0,M10.5.5/0") +#define TZ_Asia_Dhaka ("<+06>-6") +#define TZ_Asia_Dili ("<+09>-9") +#define TZ_Asia_Dubai ("<+04>-4") +#define TZ_Asia_Dushanbe ("<+05>-5") +#define TZ_Asia_Famagusta ("EET-2EEST,M3.5.0/3,M10.5.0/4") +#define TZ_Asia_Gaza ("EET-2EEST,M3.4.4/48,M10.4.4/49") +#define TZ_Asia_Hebron ("EET-2EEST,M3.4.4/48,M10.4.4/49") +#define TZ_Asia_Ho_Chi_Minh ("<+07>-7") +#define TZ_Asia_Hong_Kong ("HKT-8") +#define TZ_Asia_Hovd ("<+07>-7") +#define TZ_Asia_Irkutsk ("<+08>-8") +#define TZ_Asia_Jakarta ("WIB-7") +#define TZ_Asia_Jayapura ("WIT-9") +#define TZ_Asia_Jerusalem ("IST-2IDT,M3.4.4/26,M10.5.0") +#define TZ_Asia_Kabul ("<+0430>-4:30") +#define TZ_Asia_Kamchatka ("<+12>-12") +#define TZ_Asia_Karachi ("PKT-5") +#define TZ_Asia_Kathmandu ("<+0545>-5:45") +#define TZ_Asia_Khandyga ("<+09>-9") +#define TZ_Asia_Kolkata ("IST-5:30") +#define TZ_Asia_Krasnoyarsk ("<+07>-7") +#define TZ_Asia_Kuala_Lumpur ("<+08>-8") +#define TZ_Asia_Kuching ("<+08>-8") +#define TZ_Asia_Kuwait ("<+03>-3") +#define TZ_Asia_Macau ("CST-8") +#define TZ_Asia_Magadan ("<+11>-11") +#define TZ_Asia_Makassar ("WITA-8") +#define TZ_Asia_Manila ("PST-8") +#define TZ_Asia_Muscat ("<+04>-4") +#define TZ_Asia_Nicosia ("EET-2EEST,M3.5.0/3,M10.5.0/4") +#define TZ_Asia_Novokuznetsk ("<+07>-7") +#define TZ_Asia_Novosibirsk ("<+07>-7") +#define TZ_Asia_Omsk ("<+06>-6") +#define TZ_Asia_Oral ("<+05>-5") +#define TZ_Asia_Phnom_Penh ("<+07>-7") +#define TZ_Asia_Pontianak ("WIB-7") +#define TZ_Asia_Pyongyang ("KST-9") +#define TZ_Asia_Qatar ("<+03>-3") +#define TZ_Asia_Qyzylorda ("<+05>-5") +#define TZ_Asia_Riyadh ("<+03>-3") +#define TZ_Asia_Sakhalin ("<+11>-11") +#define TZ_Asia_Samarkand ("<+05>-5") +#define TZ_Asia_Seoul ("KST-9") +#define TZ_Asia_Shanghai ("CST-8") +#define TZ_Asia_Singapore ("<+08>-8") +#define TZ_Asia_Srednekolymsk ("<+11>-11") +#define TZ_Asia_Taipei ("CST-8") +#define TZ_Asia_Tashkent ("<+05>-5") +#define TZ_Asia_Tbilisi ("<+04>-4") +#define TZ_Asia_Tehran ("<+0330>-3:30<+0430>,J79/24,J263/24") +#define TZ_Asia_Thimphu ("<+06>-6") +#define TZ_Asia_Tokyo ("JST-9") +#define TZ_Asia_Tomsk ("<+07>-7") +#define TZ_Asia_Ulaanbaatar ("<+08>-8") +#define TZ_Asia_Urumqi ("<+06>-6") +#define TZ_Asia_UstmNera ("<+10>-10") +#define TZ_Asia_Vientiane ("<+07>-7") +#define TZ_Asia_Vladivostok ("<+10>-10") +#define TZ_Asia_Yakutsk ("<+09>-9") +#define TZ_Asia_Yangon ("<+0630>-6:30") +#define TZ_Asia_Yekaterinburg ("<+05>-5") +#define TZ_Asia_Yerevan ("<+04>-4") +#define TZ_Atlantic_Azores ("<-01>1<+00>,M3.5.0/0,M10.5.0/1") +#define TZ_Atlantic_Bermuda ("AST4ADT,M3.2.0,M11.1.0") +#define TZ_Atlantic_Canary ("WET0WEST,M3.5.0/1,M10.5.0") +#define TZ_Atlantic_Cape_Verde ("<-01>1") +#define TZ_Atlantic_Faroe ("WET0WEST,M3.5.0/1,M10.5.0") +#define TZ_Atlantic_Madeira ("WET0WEST,M3.5.0/1,M10.5.0") +#define TZ_Atlantic_Reykjavik ("GMT0") +#define TZ_Atlantic_South_Georgia ("<-02>2") +#define TZ_Atlantic_Stanley ("<-03>3") +#define TZ_Atlantic_St_Helena ("GMT0") +#define TZ_Australia_Adelaide ("ACST-9:30ACDT,M10.1.0,M4.1.0/3") +#define TZ_Australia_Brisbane ("AEST-10") +#define TZ_Australia_Broken_Hill ("ACST-9:30ACDT,M10.1.0,M4.1.0/3") +#define TZ_Australia_Currie ("AEST-10AEDT,M10.1.0,M4.1.0/3") +#define TZ_Australia_Darwin ("ACST-9:30") +#define TZ_Australia_Eucla ("<+0845>-8:45") +#define TZ_Australia_Hobart ("AEST-10AEDT,M10.1.0,M4.1.0/3") +#define TZ_Australia_Lindeman ("AEST-10") +#define TZ_Australia_Lord_Howe ("<+1030>-10:30<+11>-11,M10.1.0,M4.1.0") +#define TZ_Australia_Melbourne ("AEST-10AEDT,M10.1.0,M4.1.0/3") +#define TZ_Australia_Perth ("AWST-8") +#define TZ_Australia_Sydney ("AEST-10AEDT,M10.1.0,M4.1.0/3") +#define TZ_Europe_Amsterdam ("CET-1CEST,M3.5.0,M10.5.0/3") +#define TZ_Europe_Andorra ("CET-1CEST,M3.5.0,M10.5.0/3") +#define TZ_Europe_Astrakhan ("<+04>-4") +#define TZ_Europe_Athens ("EET-2EEST,M3.5.0/3,M10.5.0/4") +#define TZ_Europe_Belgrade ("CET-1CEST,M3.5.0,M10.5.0/3") +#define TZ_Europe_Berlin ("CET-1CEST,M3.5.0,M10.5.0/3") +#define TZ_Europe_Bratislava ("CET-1CEST,M3.5.0,M10.5.0/3") +#define TZ_Europe_Brussels ("CET-1CEST,M3.5.0,M10.5.0/3") +#define TZ_Europe_Bucharest ("EET-2EEST,M3.5.0/3,M10.5.0/4") +#define TZ_Europe_Budapest ("CET-1CEST,M3.5.0,M10.5.0/3") +#define TZ_Europe_Busingen ("CET-1CEST,M3.5.0,M10.5.0/3") +#define TZ_Europe_Chisinau ("EET-2EEST,M3.5.0,M10.5.0/3") +#define TZ_Europe_Copenhagen ("CET-1CEST,M3.5.0,M10.5.0/3") +#define TZ_Europe_Dublin ("IST-1GMT0,M10.5.0,M3.5.0/1") +#define TZ_Europe_Gibraltar ("CET-1CEST,M3.5.0,M10.5.0/3") +#define TZ_Europe_Guernsey ("GMT0BST,M3.5.0/1,M10.5.0") +#define TZ_Europe_Helsinki ("EET-2EEST,M3.5.0/3,M10.5.0/4") +#define TZ_Europe_Isle_of_Man ("GMT0BST,M3.5.0/1,M10.5.0") +#define TZ_Europe_Istanbul ("<+03>-3") +#define TZ_Europe_Jersey ("GMT0BST,M3.5.0/1,M10.5.0") +#define TZ_Europe_Kaliningrad ("EET-2") +#define TZ_Europe_Kiev ("EET-2EEST,M3.5.0/3,M10.5.0/4") +#define TZ_Europe_Kirov ("<+03>-3") +#define TZ_Europe_Lisbon ("WET0WEST,M3.5.0/1,M10.5.0") +#define TZ_Europe_Ljubljana ("CET-1CEST,M3.5.0,M10.5.0/3") +#define TZ_Europe_London ("GMT0BST,M3.5.0/1,M10.5.0") +#define TZ_Europe_Luxembourg ("CET-1CEST,M3.5.0,M10.5.0/3") +#define TZ_Europe_Madrid ("CET-1CEST,M3.5.0,M10.5.0/3") +#define TZ_Europe_Malta ("CET-1CEST,M3.5.0,M10.5.0/3") +#define TZ_Europe_Mariehamn ("EET-2EEST,M3.5.0/3,M10.5.0/4") +#define TZ_Europe_Minsk ("<+03>-3") +#define TZ_Europe_Monaco ("CET-1CEST,M3.5.0,M10.5.0/3") +#define TZ_Europe_Moscow ("MSK-3") +#define TZ_Europe_Oslo ("CET-1CEST,M3.5.0,M10.5.0/3") +#define TZ_Europe_Paris ("CET-1CEST,M3.5.0,M10.5.0/3") +#define TZ_Europe_Podgorica ("CET-1CEST,M3.5.0,M10.5.0/3") +#define TZ_Europe_Prague ("CET-1CEST,M3.5.0,M10.5.0/3") +#define TZ_Europe_Riga ("EET-2EEST,M3.5.0/3,M10.5.0/4") +#define TZ_Europe_Rome ("CET-1CEST,M3.5.0,M10.5.0/3") +#define TZ_Europe_Samara ("<+04>-4") +#define TZ_Europe_San_Marino ("CET-1CEST,M3.5.0,M10.5.0/3") +#define TZ_Europe_Sarajevo ("CET-1CEST,M3.5.0,M10.5.0/3") +#define TZ_Europe_Saratov ("<+04>-4") +#define TZ_Europe_Simferopol ("MSK-3") +#define TZ_Europe_Skopje ("CET-1CEST,M3.5.0,M10.5.0/3") +#define TZ_Europe_Sofia ("EET-2EEST,M3.5.0/3,M10.5.0/4") +#define TZ_Europe_Stockholm ("CET-1CEST,M3.5.0,M10.5.0/3") +#define TZ_Europe_Tallinn ("EET-2EEST,M3.5.0/3,M10.5.0/4") +#define TZ_Europe_Tirane ("CET-1CEST,M3.5.0,M10.5.0/3") +#define TZ_Europe_Ulyanovsk ("<+04>-4") +#define TZ_Europe_Uzhgorod ("EET-2EEST,M3.5.0/3,M10.5.0/4") +#define TZ_Europe_Vaduz ("CET-1CEST,M3.5.0,M10.5.0/3") +#define TZ_Europe_Vatican ("CET-1CEST,M3.5.0,M10.5.0/3") +#define TZ_Europe_Vienna ("CET-1CEST,M3.5.0,M10.5.0/3") +#define TZ_Europe_Vilnius ("EET-2EEST,M3.5.0/3,M10.5.0/4") +#define TZ_Europe_Volgograd ("<+04>-4") +#define TZ_Europe_Warsaw ("CET-1CEST,M3.5.0,M10.5.0/3") +#define TZ_Europe_Zagreb ("CET-1CEST,M3.5.0,M10.5.0/3") +#define TZ_Europe_Zaporozhye ("EET-2EEST,M3.5.0/3,M10.5.0/4") +#define TZ_Europe_Zurich ("CET-1CEST,M3.5.0,M10.5.0/3") +#define TZ_Indian_Antananarivo ("EAT-3") +#define TZ_Indian_Chagos ("<+06>-6") +#define TZ_Indian_Christmas ("<+07>-7") +#define TZ_Indian_Cocos ("<+0630>-6:30") +#define TZ_Indian_Comoro ("EAT-3") +#define TZ_Indian_Kerguelen ("<+05>-5") +#define TZ_Indian_Mahe ("<+04>-4") +#define TZ_Indian_Maldives ("<+05>-5") +#define TZ_Indian_Mauritius ("<+04>-4") +#define TZ_Indian_Mayotte ("EAT-3") +#define TZ_Indian_Reunion ("<+04>-4") +#define TZ_Pacific_Apia ("<+13>-13<+14>,M9.5.0/3,M4.1.0/4") +#define TZ_Pacific_Auckland ("NZST-12NZDT,M9.5.0,M4.1.0/3") +#define TZ_Pacific_Bougainville ("<+11>-11") +#define TZ_Pacific_Chatham ("<+1245>-12:45<+1345>,M9.5.0/2:45,M4.1.0/3:45") +#define TZ_Pacific_Chuuk ("<+10>-10") +#define TZ_Pacific_Easter ("<-06>6<-05>,M9.1.6/22,M4.1.6/22") +#define TZ_Pacific_Efate ("<+11>-11") +#define TZ_Pacific_Enderbury ("<+13>-13") +#define TZ_Pacific_Fakaofo ("<+13>-13") +#define TZ_Pacific_Fiji ("<+12>-12<+13>,M11.2.0,M1.2.3/99") +#define TZ_Pacific_Funafuti ("<+12>-12") +#define TZ_Pacific_Galapagos ("<-06>6") +#define TZ_Pacific_Gambier ("<-09>9") +#define TZ_Pacific_Guadalcanal ("<+11>-11") +#define TZ_Pacific_Guam ("ChST-10") +#define TZ_Pacific_Honolulu ("HST10") +#define TZ_Pacific_Kiritimati ("<+14>-14") +#define TZ_Pacific_Kosrae ("<+11>-11") +#define TZ_Pacific_Kwajalein ("<+12>-12") +#define TZ_Pacific_Majuro ("<+12>-12") +#define TZ_Pacific_Marquesas ("<-0930>9:30") +#define TZ_Pacific_Midway ("SST11") +#define TZ_Pacific_Nauru ("<+12>-12") +#define TZ_Pacific_Niue ("<-11>11") +#define TZ_Pacific_Norfolk ("<+11>-11<+12>,M10.1.0,M4.1.0/3") +#define TZ_Pacific_Noumea ("<+11>-11") +#define TZ_Pacific_Pago_Pago ("SST11") +#define TZ_Pacific_Palau ("<+09>-9") +#define TZ_Pacific_Pitcairn ("<-08>8") +#define TZ_Pacific_Pohnpei ("<+11>-11") +#define TZ_Pacific_Port_Moresby ("<+10>-10") +#define TZ_Pacific_Rarotonga ("<-10>10") +#define TZ_Pacific_Saipan ("ChST-10") +#define TZ_Pacific_Tahiti ("<-10>10") +#define TZ_Pacific_Tarawa ("<+12>-12") +#define TZ_Pacific_Tongatapu ("<+13>-13") +#define TZ_Pacific_Wake ("<+12>-12") +#define TZ_Pacific_Wallis ("<+12>-12") +#define TZ_Etc_GMT ("GMT0") +#define TZ_Etc_GMTm0 ("GMT0") +#define TZ_Etc_GMTm1 ("<+01>-1") +#define TZ_Etc_GMTm2 ("<+02>-2") +#define TZ_Etc_GMTm3 ("<+03>-3") +#define TZ_Etc_GMTm4 ("<+04>-4") +#define TZ_Etc_GMTm5 ("<+05>-5") +#define TZ_Etc_GMTm6 ("<+06>-6") +#define TZ_Etc_GMTm7 ("<+07>-7") +#define TZ_Etc_GMTm8 ("<+08>-8") +#define TZ_Etc_GMTm9 ("<+09>-9") +#define TZ_Etc_GMTm10 ("<+10>-10") +#define TZ_Etc_GMTm11 ("<+11>-11") +#define TZ_Etc_GMTm12 ("<+12>-12") +#define TZ_Etc_GMTm13 ("<+13>-13") +#define TZ_Etc_GMTm14 ("<+14>-14") +#define TZ_Etc_GMT0 ("GMT0") +#define TZ_Etc_GMTp0 ("GMT0") +#define TZ_Etc_GMTp1 ("<-01>1") +#define TZ_Etc_GMTp2 ("<-02>2") +#define TZ_Etc_GMTp3 ("<-03>3") +#define TZ_Etc_GMTp4 ("<-04>4") +#define TZ_Etc_GMTp5 ("<-05>5") +#define TZ_Etc_GMTp6 ("<-06>6") +#define TZ_Etc_GMTp7 ("<-07>7") +#define TZ_Etc_GMTp8 ("<-08>8") +#define TZ_Etc_GMTp9 ("<-09>9") +#define TZ_Etc_GMTp10 ("<-10>10") +#define TZ_Etc_GMTp11 ("<-11>11") +#define TZ_Etc_GMTp12 ("<-12>12") +#define TZ_Etc_UCT ("UTC0") +#define TZ_Etc_UTC ("UTC0") +#define TZ_Etc_Greenwich ("GMT0") +#define TZ_Etc_Universal ("UTC0") +#define TZ_Etc_Zulu ("UTC0") //////////////////////////////////////////////////////////// @@ -590,8 +590,8 @@ static const char TZ_NAME[][TIMEZONE_MAX_LEN] /*PROGMEM*/ = "Africa/Windhoek", //PSTR("CAT-2") #endif - -#if USING_AMERICA + +#if USING_AMERICA "America/Adak", //PSTR("HST10HDT",M3.2.0",M11.1.0") "America/Anchorage", //PSTR("AKST9AKDT",M3.2.0",M11.1.0") "America/Anguilla", //PSTR("AST4") @@ -742,7 +742,7 @@ static const char TZ_NAME[][TIMEZONE_MAX_LEN] /*PROGMEM*/ = "America/Yellowknife", //PSTR("MST7MDT",M3.2.0",M11.1.0") #endif -#if USING_ANTARCTICA +#if USING_ANTARCTICA "Antarctica/Casey", //PSTR("<+11>-11") "Antarctica/Davis", //PSTR("<+07>-7") "Antarctica/DumontDUrville", //PSTR("<+10>-10") @@ -757,7 +757,7 @@ static const char TZ_NAME[][TIMEZONE_MAX_LEN] /*PROGMEM*/ = "Arctic/Longyearbyen", //PSTR("CET-1CEST",M3.5.0",M10.5.0/3") #endif -#if USING_ASIA +#if USING_ASIA "Asia/Aden", //PSTR("<+03>-3") "Asia/Almaty", //PSTR("<+06>-6") "Asia/Amman", //PSTR("EET-2EEST",M3.5.4/24",M10.5.5/1") @@ -842,7 +842,7 @@ static const char TZ_NAME[][TIMEZONE_MAX_LEN] /*PROGMEM*/ = "Asia/Yerevan", //PSTR("<+04>-4") #endif -#if USING_ATLANTIC +#if USING_ATLANTIC "Atlantic/Azores", //PSTR("<-01>1<+00>",M3.5.0/0",M10.5.0/1") "Atlantic/Bermuda", //PSTR("AST4ADT",M3.2.0",M11.1.0") "Atlantic/Canary", //PSTR("WET0WEST",M3.5.0/1",M10.5.0") @@ -855,7 +855,7 @@ static const char TZ_NAME[][TIMEZONE_MAX_LEN] /*PROGMEM*/ = "Atlantic/St_Helena", //PSTR("GMT0") #endif -#if USING_AUSTRALIA +#if USING_AUSTRALIA "Australia/Adelaide", //PSTR("ACST-9:30ACDT",M10.1.0",M4.1.0/3") "Australia/Brisbane", //PSTR("AEST-10") "Australia/Broken_Hill", //PSTR("ACST-9:30ACDT",M10.1.0",M4.1.0/3") @@ -933,7 +933,7 @@ static const char TZ_NAME[][TIMEZONE_MAX_LEN] /*PROGMEM*/ = "Europe/Zurich", //PSTR("CET-1CEST",M3.5.0",M10.5.0/3") #endif -#if USING_INDIAN +#if USING_INDIAN "Indian/Antananarivo", //PSTR("EAT-3") "Indian/Chagos", //PSTR("<+06>-6") "Indian/Christmas", //PSTR("<+07>-7") @@ -946,8 +946,8 @@ static const char TZ_NAME[][TIMEZONE_MAX_LEN] /*PROGMEM*/ = "Indian/Mayotte", //PSTR("EAT-3") "Indian/Reunion", //PSTR("<+04>-4") #endif - -#if USING_PACIFIC + +#if USING_PACIFIC "Pacific/Apia", //PSTR("<+13>-13<+14>",M9.5.0/3",M4.1.0/4") "Pacific/Auckland", //PSTR("NZST-12NZDT",M9.5.0",M4.1.0/3") "Pacific/Bougainville", //PSTR("<+11>-11") @@ -988,7 +988,7 @@ static const char TZ_NAME[][TIMEZONE_MAX_LEN] /*PROGMEM*/ = "Pacific/Wallis", //PSTR("<+12>-12") #endif -#if USING_ETC_GMT +#if USING_ETC_GMT "Etc/GMT", //PSTR("GMT0") "Etc/GMTm0", //PSTR("GMT0") "Etc/GMTm1", //PSTR("<+01>-1") @@ -1024,7 +1024,7 @@ static const char TZ_NAME[][TIMEZONE_MAX_LEN] /*PROGMEM*/ = "Etc/Greenwich", //PSTR("GMT0") "Etc/Universal", //PSTR("UTC0") "Etc/Zulu", //PSTR("UTC0") -#endif +#endif }; //////////////////////////////////////////////////////////// @@ -1086,7 +1086,7 @@ static const char ESP_TZ_NAME[][TIMEZONE_MAX_LEN] /*PROGMEM*/ = TZ_Africa_Windhoek, //PSTR("CAT-2") #endif -#if USING_AMERICA +#if USING_AMERICA TZ_America_Adak, //PSTR("HST10HDT,M3.2.0,M11.1.0") TZ_America_Anchorage, //PSTR("AKST9AKDT,M3.2.0,M11.1.0") TZ_America_Anguilla, //PSTR("AST4") @@ -1236,8 +1236,8 @@ static const char ESP_TZ_NAME[][TIMEZONE_MAX_LEN] /*PROGMEM*/ = TZ_America_Yakutat, //PSTR("AKST9AKDT,M3.2.0,M11.1.0") TZ_America_Yellowknife, //PSTR("MST7MDT,M3.2.0,M11.1.0") #endif - -#if USING_ANTARCTICA + +#if USING_ANTARCTICA TZ_Antarctica_Casey, //PSTR("<+11>-11") TZ_Antarctica_Davis, //PSTR("<+07>-7") TZ_Antarctica_DumontDUrville, //PSTR("<+10>-10") @@ -1253,7 +1253,7 @@ static const char ESP_TZ_NAME[][TIMEZONE_MAX_LEN] /*PROGMEM*/ = #endif -#if USING_ASIA +#if USING_ASIA TZ_Asia_Aden, //PSTR("<+03>-3") TZ_Asia_Almaty, //PSTR("<+06>-6") TZ_Asia_Amman, //PSTR("EET-2EEST,M3.5.4/24,M10.5.5/1") @@ -1337,8 +1337,8 @@ static const char ESP_TZ_NAME[][TIMEZONE_MAX_LEN] /*PROGMEM*/ = TZ_Asia_Yekaterinburg, //PSTR("<+05>-5") TZ_Asia_Yerevan, //PSTR("<+04>-4") #endif - -#if USING_ATLANTIC + +#if USING_ATLANTIC TZ_Atlantic_Azores, //PSTR("<-01>1<+00>,M3.5.0/0,M10.5.0/1") TZ_Atlantic_Bermuda, //PSTR("AST4ADT,M3.2.0,M11.1.0") TZ_Atlantic_Canary, //PSTR("WET0WEST,M3.5.0/1,M10.5.0") @@ -1351,7 +1351,7 @@ static const char ESP_TZ_NAME[][TIMEZONE_MAX_LEN] /*PROGMEM*/ = TZ_Atlantic_St_Helena, //PSTR("GMT0") #endif -#if USING_AUSTRALIA +#if USING_AUSTRALIA TZ_Australia_Adelaide, //PSTR("ACST-9:30ACDT,M10.1.0,M4.1.0/3") TZ_Australia_Brisbane, //PSTR("AEST-10") TZ_Australia_Broken_Hill, //PSTR("ACST-9:30ACDT,M10.1.0,M4.1.0/3") @@ -1366,7 +1366,7 @@ static const char ESP_TZ_NAME[][TIMEZONE_MAX_LEN] /*PROGMEM*/ = TZ_Australia_Sydney, //PSTR("AEST-10AEDT,M10.1.0,M4.1.0/3") #endif -#if USING_EUROPE +#if USING_EUROPE TZ_Europe_Amsterdam, //PSTR("CET-1CEST,M3.5.0,M10.5.0/3") TZ_Europe_Andorra, //PSTR("CET-1CEST,M3.5.0,M10.5.0/3") TZ_Europe_Astrakhan, //PSTR("<+04>-4") @@ -1428,8 +1428,8 @@ static const char ESP_TZ_NAME[][TIMEZONE_MAX_LEN] /*PROGMEM*/ = TZ_Europe_Zaporozhye, //PSTR("EET-2EEST,M3.5.0/3,M10.5.0/4") TZ_Europe_Zurich, //PSTR("CET-1CEST,M3.5.0,M10.5.0/3") #endif - -#if USING_INDIAN + +#if USING_INDIAN TZ_Indian_Antananarivo, //PSTR("EAT-3") TZ_Indian_Chagos, //PSTR("<+06>-6") TZ_Indian_Christmas, //PSTR("<+07>-7") @@ -1443,7 +1443,7 @@ static const char ESP_TZ_NAME[][TIMEZONE_MAX_LEN] /*PROGMEM*/ = TZ_Indian_Reunion, //PSTR("<+04>-4") #endif -#if USING_PACIFIC +#if USING_PACIFIC TZ_Pacific_Apia, //PSTR("<+13>-13<+14>,M9.5.0/3,M4.1.0/4") TZ_Pacific_Auckland, //PSTR("NZST-12NZDT,M9.5.0,M4.1.0/3") TZ_Pacific_Bougainville, //PSTR("<+11>-11") @@ -1484,7 +1484,7 @@ static const char ESP_TZ_NAME[][TIMEZONE_MAX_LEN] /*PROGMEM*/ = TZ_Pacific_Wallis, //PSTR("<+12>-12") #endif -#if USING_ETC_GMT +#if USING_ETC_GMT TZ_Etc_GMT, //PSTR("GMT0") TZ_Etc_GMTm0, //PSTR("GMT0") TZ_Etc_GMTm1, //PSTR("<+01>-1") @@ -1520,7 +1520,7 @@ static const char ESP_TZ_NAME[][TIMEZONE_MAX_LEN] /*PROGMEM*/ = TZ_Etc_Greenwich, //PSTR("GMT0") TZ_Etc_Universal, //PSTR("UTC0") TZ_Etc_Zulu, //PSTR("UTC0") -#endif +#endif }; #endif // TZDB_H diff --git a/utils/astyle_library.conf b/utils/astyle_library.conf new file mode 100644 index 0000000..8a73bc2 --- /dev/null +++ b/utils/astyle_library.conf @@ -0,0 +1,70 @@ +# Code formatting rules for Arduino libraries, modified from for KH libraries: +# +# https://github.com/arduino/Arduino/blob/master/build/shared/examples_formatter.conf +# + +# astyle --style=allman -s2 -t2 -C -S -xW -Y -M120 -f -p -xg -H -xb -c --xC120 -xL *.h *.cpp *.ino + +--mode=c +--lineend=linux +--style=allman + +# -r or -R +#--recursive + +# -c => Converts tabs into spaces +convert-tabs + +# -s2 => 2 spaces indentation +--indent=spaces=2 + +# -t2 => tab =2 spaces +#--indent=tab=2 + +# -C +--indent-classes + +# -S +--indent-switches + +# -xW +--indent-preproc-block + +# -Y => indent classes, switches (and cases), comments starting at column 1 +--indent-col1-comments + +# -M120 => maximum of 120 spaces to indent a continuation line +--max-continuation-indent=120 + +# -xC120 => max‑code‑length will break a line if the code exceeds # characters +--max-code-length=120 + +# -f => +--break-blocks + +# -p => put a space around operators +--pad-oper + +# -xg => Insert space padding after commas +--pad-comma + +# -H => put a space after if/for/while +pad-header + +# -xb => Break one line headers (e.g. if/for/while) +--break-one-line-headers + +# -c => Converts tabs into spaces +#--convert-tabs + +# if you like one-liners, keep them +#keep-one-line-statements + +# -xV +--attach-closing-while + +#unpad-paren + +# -xp +remove-comment-prefix + diff --git a/utils/restyle.sh b/utils/restyle.sh new file mode 100644 index 0000000..bcd846f --- /dev/null +++ b/utils/restyle.sh @@ -0,0 +1,6 @@ +#!/bin/bash + +for dir in . ; do + find $dir -type f \( -name "*.c" -o -name "*.h" -o -name "*.cpp" -o -name "*.ino" \) -exec astyle --suffix=none --options=./utils/astyle_library.conf \{\} \; +done +