Solved Qt Installer Script - How to get current date and time
-
Hi everyone,
I wonder how I can retrieve the current date and time in the installscript.qs.
I want to backup an existing data folder with
component.addOperation( "Execute", "tar", "cfz", dataFolder + ".tar.gz", dataFolder );
and this solution already works. But now I want to add a date/time stamp before the extension, e.g. "dataFolder.2019-01-11_11-18-00.tar.gz" or as ISO-Date.
Is there anyway to get the current date and time?
regards
Oliver -
These scripts use a limited subset of JavaScript, you can try if JS Date works. API is described here: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date