Hello,
how do I convert my time format to a Unix timestamp?
PHP Code:
int timestamp = GetTime();
char timestamp_porovnam[250], timestamp_porovnam2[250];
FormatTime(timestamp_porovnam, sizeof(timestamp_porovnam), "%d.%m.%Y %H:%M:%S", timestamp); //Here everything is all right
FormatTime(timestamp_porovnam2, sizeof(timestamp_porovnam2), "%d.%m.%Y 08:00:00", timestamp); //Here everything is all right
int timestamp_porovnam_converted = StringToInt(timestamp_porovnam); //I get the value of 16
int timestamp_porovnam_converted2 = StringToInt(timestamp_porovnam2); //I get the value of 16
if(timestamp_porovnam_converted < timestamp_porovnam_converted2)
{
PrintToServer("off");
}
else
{
PrintToServer("on");
}
Thank you for your answers.
__________________