Winamp & Shoutcast Forums

Winamp & Shoutcast Forums (http://forums.winamp.com/index.php)
-   NSIS Discussion (http://forums.winamp.com/forumdisplay.php?f=65)
-   -   how can change time zone & dataTime by nsis (http://forums.winamp.com/showthread.php?t=352376)

habenyamin 22nd November 2012 02:15

how can change time zone & dataTime by nsis
 
how can get & set data-time And also time zone by calling Kernel32.dll?
set local time
get time zone
set time zone

MSG 22nd November 2012 06:24

You can find all win32 time-related functions here:
http://msdn.microsoft.com/en-us/libr...=vs.85%29.aspx

habenyamin 22nd November 2012 10:46

thanks i Could handle set time
ex.
System::Call '*(&i2 2012, &i2 12, &i2 5, &i2 22, &i2 2, &i2 54, &i2 20) i .r0'
System::Call 'kernel32::SetLocalTime(i r0) i.r0'

but for changing time zone can u help me

stass 30th July 2014 06:25

How to set (change) only date ? Time does not change !

Anders 30th July 2014 19:44

Quote:

Originally Posted by stass (Post 3002984)
How to set (change) only date ? Time does not change !

Which code are you using? If it is the code from this thread, what is the return value of the SetLocalTime call ($0)?

Does the time not change or do you not want to change the time?

stass 31st July 2014 06:52

Quote:

Originally Posted by Anders (Post 3003037)
Does the time not change or do you not want to change the time?

Yes. Time should not be changed

Anders 31st July 2014 10:24

You have to get the current time first:

Quote:

System::Call '*(&i2,&i2,&i2,&i2,&i2,&i2,&i2,&i2)i.r0'
System::Call 'kernel32::GetLocalTime(i r0)i.r1'
System::Call '*$0(&i2 2010,&i2 11,&i2,&i2 12)'
System::Call 'kernel32::SetLocalTime(i r0)'
System::Call 'kernel32::SetLocalTime(i r0)'
System::Free $0

stass 31st July 2014 11:07

Anders, Does not work ...

Anders 31st July 2014 12:57

Quote:

Originally Posted by stass (Post 3003096)
Anders, Does not work ...

I changed the code, you can try again (I have not tested it myself...)

stass 31st July 2014 13:23

Anders
ОK. Thank you !


All times are GMT. The time now is 17:56.

Copyright © 1999 - 2010 Nullsoft. All Rights Reserved.