zhangdengyu
9603f02f6a
【挑单3.2Release】修复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: #I73MT7
Signed-off-by: zhangdengyu <zhangdengyu2@huawei.com>
Change-Id: If16491f909e9564010cf4bb291f0d92b5b8fce3c
2023-05-18 12:52:51 +08:00
..
2022-09-25 18:54:03 +08:00
2022-11-23 01:46:38 +00:00
2022-08-08 23:11:11 +08:00
2023-05-18 12:52:51 +08:00
2022-06-28 08:20:09 +00:00
2021-10-21 21:39:32 +08:00
2021-10-21 21:39:32 +08:00