feat: add time offset configuration

This commit is contained in:
2026-03-24 07:20:52 +01:00
parent 560cb67722
commit 195028d994
14 changed files with 148 additions and 27 deletions
+4
View File
@@ -333,6 +333,10 @@ namespace Montauk {
return Sys_BtInfo((BtAdapterInfo*)frame->arg1);
case SYS_SUSPEND:
return Sys_Suspend();
case SYS_SETTZ:
return Sys_SetTZ((int32_t)frame->arg1);
case SYS_GETTZ:
return Sys_GetTZ();
default:
return -1;
}
+4
View File
@@ -174,6 +174,10 @@ namespace Montauk {
/* Power.hpp */
static constexpr uint64_t SYS_SUSPEND = 89;
/* Time.hpp */
static constexpr uint64_t SYS_SETTZ = 90;
static constexpr uint64_t SYS_GETTZ = 91;
static constexpr int SOCK_TCP = 1;
static constexpr int SOCK_UDP = 2;
+9
View File
@@ -29,4 +29,13 @@ namespace Montauk {
out->Minute = dt.Minute;
out->Second = dt.Second;
}
static int64_t Sys_SetTZ(int32_t offsetMinutes) {
Timekeeping::SetTZOffset(offsetMinutes);
return 0;
}
static int64_t Sys_GetTZ() {
return (int64_t)Timekeeping::GetTZOffset();
}
};