Power Builder - Cambiar Fecha en W98

 
Vista:

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)
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder

RE:Cambiar Fecha en W98

Publicado por PAVY (31 intervenciones) el 14/11/2006 20:26:13
LA FUNCION YO LA DECLARE DE LA SIGUIENTE FORMA
FUNCTION long SetLocalTime(ref str_systemtime lpSystemTime ) LIBRARY "kernel32.dll"

Y AL FINAL EN EL SCRIP TECLEE:

SetLocalTime(lstr_systemtime)

TE DEBE FUNCIONAR PARA LOS DOS POR IGUAL,
LA UNICA DIFERENCIA ES QUE EN WIN 98 CAMBIA A LA HORA EN EL MINUTO SIGUIENTE, ES DECIR

SI LA HORA DEL SERVIDOR ES 12:30:35
Y LA DE TU COMPUTADORA ES 11:30:35

CAMBIARA HASTA QUE EN EL SERVIDOR SEAN LAS 12:31:00

ESPERO TE SIRVA
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar
sin imagen de perfil
Val: 6
Ha disminuido su posición en 3 puestos en Power Builder (en relación al último mes)
Gráfica de Power Builder

RE:Cambiar Fecha en W98

Publicado por Leonardo (3 intervenciones) el 19/01/2021 21:32:10
hola Amigos ! tengo el mismo problema para cambiar la fecha del S.O (windows) desde PowerBuilder 2019
realice todos los pasos que detallaron pero no pude realizar el cambio de fecha.
me podrian ayudar!?

muchas Gracias!
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar