Archive: Seconds2Date doesn't work


Seconds2Date doesn't work
Hi,

I'm trying to use the functions CurrentDateToSeconds and SecondsToDate but the second one doesn't seems to work properly.

Here is my code (I try to add 10 days to the current date):

Push 2004
Call CurrentDateToSeconds
Pop $0

System::Int64Op 10 * 86400 ;10 days
Pop $1
System::Int64Op $0 + $1
Pop $2

Push 2004
Push $2
Call SecondstoDate
Pop $0 ;year
Pop $1 ;month
Pop $2 ;day
Pop $3 ;hour
Pop $4 ;min
Pop $5 ;sec
MessageBox MB_OK "$0/$1/$2/$3/$4/$5"

Contact the author of the function.


Please give the input and output information of the functions. EDIT: And say if you clicked on "Save script" or copied & pasted from the Archive page.


I clicked on Save Script.
With the example above I get the messagebox displays:
0/5065900///0/0
instead of:
day/month/year/hour/min/sec

In fact, 5065900 is the number of seconds since 2004


Put dumpstate::debug before and after you call the functions, and say (or attach) what was the result. (You can download DumpState in Archive)