zhangdengyu
b4873b06e8
feat: 修复time中TIMEZONE优先使用RTC模块的问题
方案描述:
1、time中timezone全局变量修改为优先从RTC获取
2、settimeofday接口,linux和posix标准有差异,m核中对齐posix标准,具体如下:
int settimeofday(const struct timeval *tv, const struct timezone *tz)
2.1、linux中:
tz参数已弃用,一般设置为NULL;
tv参数,为NULL时返回0,不设置错误码,表示不修改当前时间;
2.2、posix中:
tv或tz全部为NULL时,返回-1,设置错误码EFAULT;
tv或tz有一个不为NULL时,不设置相应的参数,返回0;不设置错误码;
3、新增settimeofday接口设置timezone相关测试用例
BREAKING CHANGE:
修复time中TIMEZONE优先使用RTC模块的问题对外变更描述:
修改int settimeofday(const struct timeval *tv, const struct timezone *tz)接口
settimeofday接口对入参的判断逻辑修改:
1、tv或tz全部为NULL时,返回-1,设置错误码EFAULT;
2、tv或tz有一个不为NULL时,不设置相应的参数,返回0;不设置错误码;
Close: #I73G40
Signed-off-by: zhangdengyu <zhangdengyu2@huawei.com>
Change-Id: Id536fc27d8bf0697765ac1543776e8105e6f62f4
2023-05-18 11:50:38 +08:00
..
2022-07-26 14:23:08 +00:00
2023-05-18 11:50:38 +08:00
2023-03-17 16:23:31 +08:00
2023-01-18 11:22:01 +08:00