Need Help for NTP Configurations for ESP32
Need Help for NTP Configurations for ESP32
Hi,
I have used NTP configurations to set time and it works fine without any issue. But, I need total List of Timezone configurations used for all over world to set time for any specific area.
Right Now, I have used following configurations as per my requirement.
// Set timezone to UTC Time
setenv("TZ", "UTC", 1);
// Set timezone to Indian Standard Time
setenv("TZ", "UTC+05:30", 1);
// Set timezone to Eastern Standard Time
setenv("TZ", "EST5EDT,M3.2.0/2,M11.1.0", 1);
// Set timezone to China Standard Time
setenv("TZ", "CST-8CDT-9,M4.2.0/2,M9.2.0/3", 1);
So, Please provide me List of standard timezone to be used world wide to set corresponding time according to setenv API. Also, Let me know if anyone has included all those timezones into single array because our application can be used in any place across world and we want to configured timezone according to that from application.
Let me know if anyone has any confusion for above use-case.
I have used NTP configurations to set time and it works fine without any issue. But, I need total List of Timezone configurations used for all over world to set time for any specific area.
Right Now, I have used following configurations as per my requirement.
// Set timezone to UTC Time
setenv("TZ", "UTC", 1);
// Set timezone to Indian Standard Time
setenv("TZ", "UTC+05:30", 1);
// Set timezone to Eastern Standard Time
setenv("TZ", "EST5EDT,M3.2.0/2,M11.1.0", 1);
// Set timezone to China Standard Time
setenv("TZ", "CST-8CDT-9,M4.2.0/2,M9.2.0/3", 1);
So, Please provide me List of standard timezone to be used world wide to set corresponding time according to setenv API. Also, Let me know if anyone has included all those timezones into single array because our application can be used in any place across world and we want to configured timezone according to that from application.
Let me know if anyone has any confusion for above use-case.
Regards,
Ritesh Prajapati
Ritesh Prajapati
Re: Need Help for NTP Configurations for ESP32
This is likely what you are looking for:
https://www.iana.org/time-zones
This was referenced here:
https://www.gnu.org/software/libc/manua ... iable.html
https://www.iana.org/time-zones
This was referenced here:
https://www.gnu.org/software/libc/manua ... iable.html
Free book on ESP32 available here: https://leanpub.com/kolban-ESP32
Re: Need Help for NTP Configurations for ESP32
Thanks for providing informations.kolban wrote:This is likely what you are looking for:
https://www.iana.org/time-zones
This was referenced here:
https://www.gnu.org/software/libc/manua ... iable.html
I will check and will let you know if need any further help for that.
Regards,
Ritesh Prajapati
Ritesh Prajapati
Re: Need Help for NTP Configurations for ESP32
We just created a GitHub project to maintain posix time zone strings DB.
https://github.com/nayarsystems/posix_tz_db
https://github.com/nayarsystems/posix_tz_db
- martinayotte
- Posts: 141
- Joined: Fri Nov 13, 2015 4:27 pm
Re: Need Help for NTP Configurations for ESP32
The DB is missing "America/Montreal" ...
Re: Need Help for NTP Configurations for ESP32
jaracil: this is super useful, thank you for sharing. Would you mind to amend Readme mentioning what license is the project distributed under?
Re: Need Help for NTP Configurations for ESP32
Same TZ as Toronto, right? To have the most compact db you only want to list the largest city per time zone. Although there are 8 cities listed in Indiana for some reason.martinayotte wrote:The DB is missing "America/Montreal" ...
Re: Need Help for NTP Configurations for ESP32
martinayotte: Added America/Montreal.
ESP_Igrr: Just Added LICENSE file (MIT).
ESP_Igrr: Just Added LICENSE file (MIT).
- martinayotte
- Posts: 141
- Joined: Fri Nov 13, 2015 4:27 pm
Re: Need Help for NTP Configurations for ESP32
Thanks, jaracil !
https://www.timeanddate.com/time/map/
Right ! But the same is true for Ottawa/Detroit/Boston/Washington/New York/Philadelphia/Atlanta/Indianapolis/Miami ...WiFive wrote:Same TZ as Toronto, right?
https://www.timeanddate.com/time/map/
Re: Need Help for NTP Configurations for ESP32
Right but these are not on the list either Ottawa/Boston/Washington/Philadelphia/Atlanta/Miami
To make it as compact as possible, it should be only one listing per time zone per country/region and use the largest city.
To make it as compact as possible, it should be only one listing per time zone per country/region and use the largest city.
Who is online
Users browsing this forum: No registered users and 79 guests