feat: 添加时区设置功能,默认时区改为 CST-8
- 新增 set_timezone LLM 工具,支持通过对话设置时区 - 新增 set_timezone / timezone_show CLI 命令 - 默认时区从 PST 改为 CST-8(中国标准时间 UTC+8) - 支持 POSIX 格式和 18 个城市名映射(Asia/Shanghai 等) - 时区通过 NVS 持久化存储(system_config namespace) - config_show 中显示当前时区配置 - 更新 changelog.md 和 taolun.md 文档
This commit is contained in:
11
main/tools/tool_set_timezone.h
Normal file
11
main/tools/tool_set_timezone.h
Normal file
@@ -0,0 +1,11 @@
|
||||
#pragma once
|
||||
|
||||
#include "esp_err.h"
|
||||
#include <stddef.h>
|
||||
|
||||
/**
|
||||
* Execute set_timezone tool.
|
||||
* Sets the system timezone via NVS and updates the TZ environment variable.
|
||||
* Input JSON: {"timezone": "CST-8"} or {"timezone": "Asia/Shanghai"}
|
||||
*/
|
||||
esp_err_t tool_set_timezone_execute(const char *input_json, char *output, size_t output_size);
|
||||
Reference in New Issue
Block a user