forked from ground/ground
made the _ToEpoch functions in the datetime lib return INTs instead of DOUBLEs
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user