Does anybody know if I'm doing something wrong while using the mod (%) operator? I'm trying to calculate the current time from a timestamp for use in a log file, but the following script is outputting an incorrect result.
This:
Outputs:
While google tells me that 1231377629 % 86400 = 4829. Anybody have any ideas?
EDIT: This is on r6733 if it matters.
This:
Code:
void main()
{
print(1231377629%86400);
}
Outputs:
Code:
4864.0
While google tells me that 1231377629 % 86400 = 4829. Anybody have any ideas?
EDIT: This is on r6733 if it matters.