MX
2022-11-24 01:19:19 +03:00
parent 2c51c8cb31
commit b6435374d7
68 changed files with 877 additions and 381 deletions

View File

@@ -0,0 +1,16 @@
#include "timezone_utils.h"
int32_t timezone_offset_from_hours(float hours) {
return hours * 3600.0f;
}
uint64_t timezone_offset_apply(uint64_t time, int32_t offset) {
uint64_t for_time_adjusted;
if(offset > 0) {
for_time_adjusted = time - offset;
} else {
for_time_adjusted = time + (-offset);
}
return for_time_adjusted;
}