Cambiar Fecha en W98
Publicado por fabian (3 intervenciones) el 10/11/2006 12:53:46
Necesito cambiar la fecha de la pc en W98 con PB7. tome del foro una rutina (se las detallo a continuacion) que me sirvio para XP pero no en W98. Agradecere cualquier ayuda sobre el tema.
Esta es la rutina
1. Primero, creá una estructura (File/New/Structure):
// uint=unsignedinteger
uint year
uint month
uint dayofweek
uint day
uint hour
uint minute
uint second
uint millisecond
Nota: Guardá la estructura con el nombre: os_systemtime
2. Declará la siguiente Local External Functions:
Function boolean SetLocalTime(ref os_systemtime lpSystemTime) &
Library "Kernel32.dll"
3. Finalmente el script es:
boolean lb_rc
os_systemtime lstr_systemtime
datetime ldt_new
//25 de diciembre de 2005 y 23:45:00 horas.
ldt_new = DateTime(2005-12-25, 23:45:00)
lstr_systemtime.year = Year(Date(ldt_new))
lstr_systemtime.month = Month(Date(ldt_new))
lstr_systemtime.dayofweek = DayNumber(Date(ldt_new))
lstr_systemtime.day = Day(Date(ldt_new))
lstr_systemtime.hour = Hour(Time(ldt_new))
lstr_systemtime.minute = Minute(Time(ldt_new))
lstr_systemtime.second = Second(Time(ldt_new))
lstr_systemtime.millisecond = 0
lb_rc = SetLocalTime(lstr_systemtime)
Esta es la rutina
1. Primero, creá una estructura (File/New/Structure):
// uint=unsignedinteger
uint year
uint month
uint dayofweek
uint day
uint hour
uint minute
uint second
uint millisecond
Nota: Guardá la estructura con el nombre: os_systemtime
2. Declará la siguiente Local External Functions:
Function boolean SetLocalTime(ref os_systemtime lpSystemTime) &
Library "Kernel32.dll"
3. Finalmente el script es:
boolean lb_rc
os_systemtime lstr_systemtime
datetime ldt_new
//25 de diciembre de 2005 y 23:45:00 horas.
ldt_new = DateTime(2005-12-25, 23:45:00)
lstr_systemtime.year = Year(Date(ldt_new))
lstr_systemtime.month = Month(Date(ldt_new))
lstr_systemtime.dayofweek = DayNumber(Date(ldt_new))
lstr_systemtime.day = Day(Date(ldt_new))
lstr_systemtime.hour = Hour(Time(ldt_new))
lstr_systemtime.minute = Minute(Time(ldt_new))
lstr_systemtime.second = Second(Time(ldt_new))
lstr_systemtime.millisecond = 0
lb_rc = SetLocalTime(lstr_systemtime)
Valora esta pregunta


0