openharmony_kernel_liteos_m/kal
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
..
cmsis feat: 增加mutex trace功能 2022-11-07 08:42:06 +08:00
libc fix:newlib error解决 2023-03-01 11:52:34 +08:00
libsec fix: 当前仓代码编译告警的问题 2022-01-19 02:27:14 +00:00
posix feat: 修复time中TIMEZONE优先使用RTC模块的问题 2023-05-18 11:50:38 +08:00
BUILD.gn feature: 支持newlib与musl切换 2021-12-04 21:43:55 +08:00
Kconfig feature: 支持newlib与musl切换 2021-12-04 21:43:55 +08:00