| |
|
|
| Dieter Zornow (07.12.2010)
I have time something with the new Datumsfunktionen of XProfan 12 herumgespielt on the example the Installationsdatums Windows. Should Windows XP To Win 7 and all Datumsformaten as well as all Zeitzonen functions. only The Sommerzeit remaining unregarded, there windows Beginn and end not detect can. CompileMarkSeparation'Autor Dieter Zornow
'Nur für Xprofan ab Version 12
Proc Wininstalldate
Var bias! = 0
Var bias$ = @Readini$("HKEY_DW_2","SYSTEM\ControlSet001\Control\TimeZoneInformation","Bias")
If bias$ <> "0"
If Left$(bias$,1) = "-"
bias$ = del$(bias$,1,1)
Else bias$ = "-"+bias$
EndIf
bias! = val(bias$)
endif
Var uts$ = Readini$("HKEY_DW_2","SOFTWARE\Microsoft\Windows NT\CurrentVersion","InstallDate")
Var uts! = Val(uts$)
Var t! = uts!/86400
var test$ = Upper$(Readini$("HKEY_1","Control Panel\International","sShortDate"))
if instr(".",test$)
If Left$(test$,1) = "D"
Var u! = dt("setDate", "01.01.1970")'unixtime
Var d! = dt("setDate", "30.12.1899")'delphitime
Else
Var u! = dt("setDate", "01.01.1970")'unixtime
Var d! = dt("setDate", "12.30.1899")'delphitime
endif
elseif instr("/",test$)
If Left$(test$,1) = "D"
Var u! = dt("setDate", "01/01/1970")'unixtime
Var d! = dt("setDate", "30/12/1899")'delphitime
Else
Var u! = dt("setDate", "01/01/1970")'unixtime
Var d! = dt("setDate", "12/30/1899")'delphitime
endif
elseif instr("-",test$)
If Left$(test$,1) = "D"
Var u! = dt("setDate", "01-01-1970")'unixtime
Var d! = dt("setDate", "30-12-1899")'delphitime
Else
Var u! = dt("setDate", "01-01-1970")'unixtime
Var d! = dt("setDate", "12-30-1899")'delphitime
endif
endif
Var b! = dt("DaysBetween", d!,u!)
Var idate$ = dt("getDate",6,t!+b!)
t! = dt("setDate",left$(idate$,10))
idate$ = del$(idate$,1,11)
t! = dt("setTime",idate$, t!)
Var d2! = dt("incMin", t!,bias!)
return dt("getDate",6,d2!)
endproc
CLS
print Wininstalldate()class=s4 href='./../../function-references/XProfan/waitinput/'>waitinput
|
|
|
| |
|
|