This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

Synchronize the system clock time
#1
Unfortunately, I have no sync with NTP Server.


Is it possible to change the system clock time from a group address?
Reply
#2
See this example:
http://openrb.com/example-change-timedat...pt-on-lm2/
Reply
#3
(30.06.2017, 12:22)admin Wrote: See this example:
http://openrb.com/example-change-timedat...pt-on-lm2/

I have tried it with this example but there is a problem.

If the group address sends the time, this is also accepted by the system.

But the clock does not continue in the system and stops.
Reply
#4
What do you mean that the clock stops?
Reply
#5
Sorry.

I have found my error.

This is not a resident script!! This is a Event-Based script

date = grp.getvalue('date_object')
time = grp.getvalue('time_object')

cmd = string.format("date -s '%d-%d-%d %d:%d:%d'", date.year, date.month, date.day, time.hour, time.minute, time.second)
os.execute(cmd)
Reply


Forum Jump: