made the _ToEpoch functions in the datetime lib return INTs instead of DOUBLEs

This commit is contained in:
2026-03-20 07:53:29 +11:00
parent f9c333a1bc
commit a8097c9cf7
2 changed files with 4 additions and 4 deletions

View File

@@ -84,7 +84,7 @@ GroundValue datetime_ToEpochLocal(GroundScope* scope, List args) {
};
time_t ts = mktime(&t);
return groundCreateValue(DOUBLE, (double)ts);
return groundCreateValue(INT, (long long)ts);
}
GroundValue datetime_ToEpochUTC(GroundScope* scope, List args) {
@@ -124,7 +124,7 @@ GroundValue datetime_ToEpochUTC(GroundScope* scope, List args) {
};
time_t ts = timegm(&t);
return groundCreateValue(DOUBLE, (double)ts);
return groundCreateValue(INT, (long long)ts);
}
GroundValue formatDatetimeObj(GroundObject obj, char* formatString) {