IST TimeZone +5.30 #443
Replies: 3 comments 1 reply
-
|
|
Beta Was this translation helpful? Give feedback.
-
|
Sir i am from India.
My Local Timezone is +5.30
I tried in.pool.ntp.org 5.30 but nothing worked.
What should be the correct syntax
Thanks & regards
Shekhar Singh
…On Wed, 5 Jan, 2022, 4:07 PM Hieromon Ikasamo, ***@***.***> wrote:
Simple.ino is provided as an example only and does not cover all time
zones. Offset +5:30 is not the only time zone that Simple.ino does not
include. It also doesn't include -3:30, +3:30, +4:30, +8:45, etc.
Which region's UTC offset do you think is appropriate to include? I can't
determine where the typical region is for +5:30 offset.
If you need it for personal reasons, you can modify Simple.ino yourself.
See below:
https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
https://www.pool.ntp.org/zone/@
—
Reply to this email directly, view it on GitHub
<#443 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AXFELM4HTWBPRMDYAGNB7DDUUQNOZANCNFSM5LI4WLIQ>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
|
Sir
it will be more helpful if you write the code.
i tried many ways but the result is not even close.
…On Wed, Jan 5, 2022 at 8:16 PM Hieromon Ikasamo ***@***.***> wrote:
Simple.ino has declared the time zone list with time offset for tz
database as the Timezone_t struct.
typedef struct {
const char* zone;
const char* ntpServer;
int8_t tzoff;
} Timezone_t;
The tzoff member of Timezone_t is int, so to set a time offset of less
than one hour, you need to change the interface of the configTime that
Simple.io uses. The first parameter of the configTime function accepts tz
names in addition to gmtOffest value.
You can add a TZ member as char* and pass to the 1st-parameter of
configTime. According to the ESP-IDF documentation
<https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-reference/system/system_time.html?highlight=setenv#timezones>,
Call setenv() to set the TZ environment variable. And, the configTime
function does exactly that. So all you have to do is to specify a POSIX
compliant TZ
<https://www.gnu.org/software/libc/manual/html_node/TZ-Variable.html>.
https://github.com/espressif/arduino-esp32/blob/caef4006af491130136b219c1205bdcf8f08bf2b/cores/esp32/esp32-hal-time.c#L83
-
ESP8266 configTime
https://github.com/esp8266/Arduino/blob/a05a71fa9d2e6b143cb34f01b47e22c4b66b80a1/cores/esp8266/Arduino.h#L269-#L273
-
ESP32 configTime
https://github.com/espressif/arduino-esp32/blob/caef4006af491130136b219c1205bdcf8f08bf2b/cores/esp32/Arduino.h#L189-#L192
—
Reply to this email directly, view it on GitHub
<#443 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AXFELM2FMV67JADO6MULDC3UURKVJANCNFSM5LI4WLIQ>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
In simple. ino there is no option for 5.30 timezone, can anyone fix this
Beta Was this translation helpful? Give feedback.
All reactions