Here we can all chat about fixing the AT+ command structure and the associated responses.

User avatar
By Zaman
#90238 Hi.
I use the latest esp8266 AT firmware (rtos based).
based on this official doc: https://docs.espressif.com/projects/esp-at/en/latest/AT_Command_Set/TCP-IP_AT_Commands.html#id56
<timezone>: support the following two formats:

The first format range is [-12,14]. It marks most of the time zones by offset from Coordinated Universal Time (UTC) in whole hours (UTC−12:00 to UTC+14:00).

The second format is UTC offset. The UTC offset specifies the time value you must add to the UTC time to get a local time value. It has syntax like [+|-]hh[mm]. This is negative if the local time zone is on the west of the Prime Meridian and positive if it is on the east. The hour(hh) must be between -12 and 14, and the minute(mm) between 0 and 59. For example, if you want to set the timezone to New Zealand (Chatham Islands) which is in UTC+12:45, you should set the parameter <timezone> to 1245. Please refer to UTC offset
wiki for more information.

Code: Select allExample
// Enable SNTP server, set timezone to China (UTC+08:00)
AT+CIPSNTPCFG=1,8,"cn.ntp.org.cn","ntp.sjtu.edu.cn"
or
AT+CIPSNTPCFG=1,800,"cn.ntp.org.cn","ntp.sjtu.edu.cn"
// Enable SNTP server, set timezone to New York of the United States (UTC−05:00)
AT+CIPSNTPCFG=1,-5,"0.pool.ntp.org","time.google.com"
or
AT+CIPSNTPCFG=1,-500,"0.pool.ntp.org","time.google.com"
// Enable SNTP server, set timezone to New Zealand (Chatham Islands, UTC+12:45)
AT+CIPSNTPCFG=1,1245,"0.pool.ntp.org","time.google.com"



I need to set the timezone to +3:30.
This AT firmware is working with method 1 but returns ERROR for method 2.

Code: Select allAT+GMR
AT version:2.1.0.0(ded5b14 - Jul 24 2020 12:01:05)
SDK version:v3.3-2-gb6e861a
compile time(36bb200):Jul 28 2020 08:30:34
Bin version:2.1.0(WROOM-02)

OK
AT+CIPSNTPCFG=1,3,"0.asia.pool.ntp.org"

OK
AT+CIPSNTPCFG=1,-3,"0.asia.pool.ntp.org"

OK
AT+CIPSNTPCFG=1,330,"0.asia.pool.ntp.org"

ERROR


What I am doing wrong?