diff --git a/orbis-kernel/src/sys/sys_sce.cpp b/orbis-kernel/src/sys/sys_sce.cpp index e07b844e5..96fb60198 100644 --- a/orbis-kernel/src/sys/sys_sce.cpp +++ b/orbis-kernel/src/sys/sys_sce.cpp @@ -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));