implemented RFE #1459210 - !define /date should use UTC
added /utcdate flag git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@4622 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
parent
411a2d5c58
commit
12df15a9e5
3 changed files with 9 additions and 4 deletions
|
@ -2693,15 +2693,20 @@ int CEXEBuild::doCommand(int which_token, LineParser &line)
|
|||
char mathbuf[256];
|
||||
bool date=false;
|
||||
|
||||
if (!stricmp(define,"/date")) {
|
||||
if (!stricmp(define,"/date") || !stricmp(define,"/utcdate")) {
|
||||
if (line.getnumtokens()!=4) PRINTHELP()
|
||||
|
||||
char *date_type = define;
|
||||
|
||||
define=line.gettoken_str(2);
|
||||
value=line.gettoken_str(3);
|
||||
|
||||
time_t rawtime;
|
||||
time(&rawtime);
|
||||
|
||||
if (!stricmp(date_type,"/utcdate"))
|
||||
rawtime = mktime(gmtime(&rawtime));
|
||||
|
||||
datebuf[0]=0;
|
||||
size_t s=strftime(datebuf,sizeof(datebuf),value,localtime(&rawtime));
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue