mirror of
https://github.com/RPCSX/rpcsx.git
synced 2025-03-03 16:18:12 +00:00
Fix sys_utc_to_localtime+
This commit is contained in:
parent
3e10dac4dc
commit
0e1217d131
@ -1031,11 +1031,10 @@ orbis::SysResult orbis::sys_utc_to_localtime(Thread *thread, int64_t time,
|
||||
int64_t *localtime,
|
||||
orbis::timesec *_sec,
|
||||
int *_dst_sec) {
|
||||
// Disabled for now
|
||||
thread->retval[0] = (int)ErrorCode::RANGE;
|
||||
return {};
|
||||
|
||||
ORBIS_LOG_TRACE(__FUNCTION__, time, localtime, _sec, _dst_sec);
|
||||
// Disabled for now
|
||||
return SysResult::notAnError(ErrorCode::RANGE);
|
||||
|
||||
struct ::tm tp;
|
||||
auto result = ::mktime(::localtime_r(&time, &tp));
|
||||
if (auto e = uwrite(localtime, result); e != ErrorCode{})
|
||||
@ -1048,11 +1047,10 @@ orbis::SysResult orbis::sys_localtime_to_utc(Thread *thread, int64_t time,
|
||||
uint unk, int64_t *ptime,
|
||||
orbis::timesec *_sec,
|
||||
int *_dst_sec) {
|
||||
// Disabled for now
|
||||
thread->retval[0] = (int)ErrorCode::RANGE;
|
||||
return {};
|
||||
|
||||
ORBIS_LOG_TRACE(__FUNCTION__, time, unk, ptime, _sec, _dst_sec);
|
||||
// Disabled for now
|
||||
return SysResult::notAnError(ErrorCode::RANGE);
|
||||
|
||||
struct ::tm tp;
|
||||
::time_t timez = 0;
|
||||
auto result = time - ::mktime(::localtime_r(&timez, &tp));
|
||||
|
Loading…
x
Reference in New Issue
Block a user