Hello everybody,
First I'd like to thank Ken Lee for the tip of MicroAngelo (nice app). Here the millon dolar question: Have anyone set the system time and date from a dolphin application? How do you do this? I haven't found how to do this yet. regards, Sebastian [hidden email] [hidden email] |
Sebastian
If you mean setting the time and date to add a time stamp then this is straightforward:- Time dateAndTimeNow If you mean resetting the system date and time from within a Dolphin Application I guess this could be done - you would need to add the Windows message SetSystemTime message to the KernalLibrary and I think you would also have to add system privilages to the calling process David "Sebastian" <[hidden email]> wrote in message news:95h156$go2b1$[hidden email]... > Hello everybody, > > First I'd like to thank Ken Lee for the tip of MicroAngelo (nice app). > > Here the millon dolar question: > > Have anyone set the system time and date from a dolphin application? > How do you do this? > > I haven't found how to do this yet. > > regards, > > Sebastian > [hidden email] > [hidden email] > > > |
Hi David,
yes, I need to set the system time to sincronize the time and date between differents dolphin applicationd on a LAN. I set it in one app and they comunicate each other through sockets an set the same system time. I'm affraid I don't have been using the kernel before. How do I add that message and where I can get info about the parameters of that call? I don't know how to prepare the data. thanks, regards Sebastian David Royal <[hidden email]> escribió en el mensaje de noticias 95hd0c$eu1$[hidden email]... > Sebastian > > If you mean setting the time and date to add a time stamp then this is > straightforward:- > > Time dateAndTimeNow > > If you mean resetting the system date and time from within a Dolphin > Application I guess this could be done - you would need to add the Windows > message SetSystemTime message to the KernalLibrary and I think you would > also have to add system privilages to the calling process > > David > > "Sebastian" <[hidden email]> wrote in message > news:95h156$go2b1$[hidden email]... > > Hello everybody, > > > > First I'd like to thank Ken Lee for the tip of MicroAngelo (nice > > > > Here the millon dolar question: > > > > Have anyone set the system time and date from a dolphin application? > > How do you do this? > > > > I haven't found how to do this yet. > > > > regards, > > > > Sebastian > > [hidden email] > > [hidden email] > > > > > > > > |
Sebastian
This appears to work on my Win98 machine: Add the following method to KernelLibrary setSystemTime: aSYSTEMTIME "Sets the local date and time. BOOL SetSystemTime( CONST SYSTEMTIME *lpSystemTime // address of system time to set );" < stdcall: bool SetSystemTime SYSTEMTIME* > ^self invalidCall In a workspace the following sets the clock forward by 1 hour time:=SYSTEMTIME now. time wHour:(time wHour +1). KernelLibrary default setSystemTime:time Hope this helps David Sent via Deja.com http://www.deja.com/ |
Hi David,
I think your method works but we are missing something here. I've added your >>setSystemTime: to the kernel, then I evaluate the workspace that you provided me. time := SYSTEMTIME now. a SYSTEMTIME(18:51:01, Martes, 06 de Febrero de 2001) time wHour:(time wHour +1). a SYSTEMTIME(19:51:01, Martes, 06 de Febrero de 2001) KernelLibrary default setSystemTime:time. true Time now 16:51:19 this is the pathologic one. my system time goes 2 hours backwards. I runnin it on a win98 (spanish version). Could the local settings be involved? regards Sebastian |
Sebastian
Strange - I'm not sure what is happening here - it seems to work correctly on my work and home machines ( both running Win98SE -English version). Perhaps someone else would try it? David "Sebastian" <[hidden email]> wrote in message news:95s930$ikcq7$[hidden email]... > Hi David, > > I think your method works but we are missing something here. > > I've added your >>setSystemTime: to the kernel, then I evaluate the > workspace that you provided me. > > time := SYSTEMTIME now. a SYSTEMTIME(18:51:01, Martes, 06 de Febrero de > 2001) > time wHour:(time wHour +1). a SYSTEMTIME(19:51:01, Martes, 06 de Febrero > de 2001) > > KernelLibrary default setSystemTime:time. true > > Time now 16:51:19 this is the pathologic one. > > my system time goes 2 hours backwards. > > I runnin it on a win98 (spanish version). Could the local settings be > involved? > > regards > > Sebastian > > > |
Hi David and Sebastian,
I think the problem is that you are asking for a local time, and then setting "system" time which is Universal time. Have a look at; http://msdn.microsoft.com/library/psdk/sysmgmt/time_5gh1.htm http://msdn.microsoft.com/library/psdk/sysmgmt/time_7xr9.htm Instead of using KernelLibrary>>setSystemTime: use KernelLibrary>>setLocalTime: David, do you live in the time zone where UTC=Local time? Steve SYSTEMTIME now answers local time, and setSystemTime set "David Royal" <[hidden email]> wrote in message news:95tifo$dab$[hidden email]... > Sebastian > > Strange - I'm not sure what is happening here - it seems to work correctly > on my work and home machines ( both running Win98SE -English version). > Perhaps someone else would try it? > > David > "Sebastian" <[hidden email]> wrote in message > news:95s930$ikcq7$[hidden email]... > > Hi David, > > > > I think your method works but we are missing something here. > > > > I've added your >>setSystemTime: to the kernel, then I evaluate the > > workspace that you provided me. > > > > time := SYSTEMTIME now. a SYSTEMTIME(18:51:01, Martes, 06 de Febrero > de > > 2001) > > time wHour:(time wHour +1). a SYSTEMTIME(19:51:01, Martes, 06 de > Febrero > > de 2001) > > > > KernelLibrary default setSystemTime:time. true > > > > Time now 16:51:19 this is the pathologic one. > > > > my system time goes 2 hours backwards. > > > > I runnin it on a win98 (spanish version). Could the local settings > > involved? > > > > regards > > > > Sebastian > > > > > > > > |
Steve
> I think the problem is that you are asking for a local time, and then > setting "system" time which is Universal time. Have a look at; > > http://msdn.microsoft.com/library/psdk/sysmgmt/time_5gh1.htm > http://msdn.microsoft.com/library/psdk/sysmgmt/time_7xr9.htm > > Instead of using KernelLibrary>>setSystemTime: use > KernelLibrary>>setLocalTime: > > David, do you live in the time zone where UTC=Local time? > Thanks Steve - I do indeed live in the GMT timezone ( north east England) and so my local time would =UTC. David Sent via Deja.com http://www.deja.com/ |
Thank you Both !
I love this list ! best regards, Sebastian From Buenos Aires - Argentina <[hidden email]> escribió en el mensaje de noticias 95tn7f$8bp$[hidden email]... > Steve > > > I think the problem is that you are asking for a local time, and then > > setting "system" time which is Universal time. Have a look at; > > > > http://msdn.microsoft.com/library/psdk/sysmgmt/time_5gh1.htm > > http://msdn.microsoft.com/library/psdk/sysmgmt/time_7xr9.htm > > > > Instead of using KernelLibrary>>setSystemTime: use > > KernelLibrary>>setLocalTime: > > > > David, do you live in the time zone where UTC=Local time? > > > > Thanks Steve - I do indeed live in the GMT timezone ( north east > England) and so my local time would =UTC. > > David > > > Sent via Deja.com > http://www.deja.com/ |
Free forum by Nabble | Edit this page |