Please let me know How to get current Unix timestamp in Inno Setup?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The easiest way is to use the
time()function from the C runtime library, which has the following return value:which is exactly what the unix timestamp is.
Now it’s a simple matter of importing that function into Inno Setup scripting. Since the scripting environment doesn’t know pointers the parameter (which luckily need not point to a valid buffer, see the linked documentation) is given as integer and you must pass a 0 for it: