Subj : Remote - Local Time synchro To : Jasen Betts From : Gerald Miller Date : Sun Jul 28 2002 10:12 am Hello Jasen, On Sunday July 21 2002 at 07:11, Jasen Betts [3:640/531.42] wrote to Gerald Miller, about: Remote - Local Time synchro Sorry for the delay in getting back to you but my employer had an emergency and I was sent out of town to attend to it. [snip] JB>>> if you want you could use inkey to delay and if the use doesn't JB>>> say no include the inkey delay could be the synchronisation JB>>> delay. GM>> This sounds appealing... Would you provide an example? JB> assuming %localtime and %remotetime are the times read from the JB> logfile. JB> set correction = %@eval[(%@maketime[%remotetime]-%@time[%localtime] JB> %+ JB> +43200 ) %% 86400 - 43200 ]] The above line(s) gave me problems..... I was able to get it to work by changing it to: set correction=%@eval[(%remotetime - %localtime + 43200) %= %% 86400 - 43200] remotetime is: 23855 localtime is: 23861 Correction is: -6 JB> :: %correction is the time difference seconds, JB> :: and is negative if your computer is fast. JB> iff %correction lt -1 When the batch gets to the above line, there is an error because the batch file gets loaded into my editor and is on the above line.... JB> set z= JB> inkey /w%@eval[%correction *-1] Correcting time: "c" to %= JB> cancel /KC %%z JB> if "%z" ne "c" time %@maketime[%@eval[(%@time[%_time]%= JB> +%correction)%%86400]] JB> set z= JB> elseiff %correction gt i Is the above line a "typo"? JB> :: correct time forwards - no waiting JB> time %@maketime[%@eval[(%@time[%_time]+%correction)%%86400]] JB> endiff JB>>> most times you'll probably only have to adjust by a few seconds JB>>> (if you only get 1 second difference probably you should ignore JB>>> it because it could really be less than one second) GM>> It's a math problem...... JB> yes, a rounding error. GM>> This doesn't work, yet I can't see where my error is.... JB> it looks to me like you're trying too hard. A distinct possibility.... 8-) [snip] JB> time sets the time to a few milliseconds before the time you ask for. JB> could that be the problem? OTOH %act or %amount could have the wrong JB> value... There is a likelihood that %act or %amount contained the wrong values and therefore, I ripped that section from the batch... Cheers ... Gerald --- GoldED+/386 v1.1.5-20719 # Origin: This tagline does not require Micro$oft Windows. (1:342/512) * Origin: Baddog BBS (1:218/903) .