could you guys give a an example of a code that prints DateTimeToUnix in Pascal?
Found out a topic talking about in Delphi (DateTimeToUnix in UTC?), but i cant find a code example anywhere.
function DateTimeToUnix(
const AValue: TDateTime
):Int64;
Here is an example in c#
public static int UnixTimeStamp()
{
return (int)DateTime.UtcNow.Subtract(new DateTime(1970, 1, 1)).TotalSeconds;
}
}
Also, i did a little search and this function seems to print the System time without using timezone (UTC), so how i could adjust the result to the timezone i want (eg. UTC -3).
Thanks,