Home/Support/Support Forum/synchronize the systemclock with python
Welcome to Digi Forum, where you can ask questions and receive answers from other members of the community.

synchronize the systemclock with python

0 votes
Hallo,
I tried to synchronize the systemclock of an Connectport X4.

os.system() will not work.

Is there a possibility?
asked Apr 14, 2008 in Python by arndt.rinne New to the Community (6 points)

Please log in or register to answer this question.

12 Answers

0 votes
Can you clarify your intent?

When you say "synchronize", are you attempting to "set" the time that is returned by, for instance, the time module? I assume that you would (in this case) already be retrieving the time from some external source.
answered Apr 14, 2008 by 52637p Community Contributor (59 points)
0 votes
i had wrote a python programme, which will get the time from an NTP-Server once a day.
In the programme I use the localism()-function with the ConnectPort X4 rtc.
For time correction i want to synchronize the RTC to the NTP-time once a day.
answered Apr 14, 2008 by arndt.rinne New to the Community (6 points)
0 votes
As of the "C" revision of the 82001536 (ConnectPort X4) firmware, the embedded Python has supported a module named "digicli". The module has one method: "digicli". The function accepts a Digi CLI command string and executes the string, return a tuple with a boolean success status and a list of the lines of CLI output. This can be used to execute the "set time" command.

Untested example:

from digicli import digicli
status, output = digicli("set time date=04.14.08 time=12:34:02")
answered Apr 14, 2008 by 52637p Community Contributor (59 points)
0 votes
Current Version of Firmware supplies the feature.
Thanks!


Message was edited by: arndt.rinne
answered Apr 15, 2008 by arndt.rinne New to the Community (6 points)
0 votes
Does this also apply to the ConnectPort X2? I have

Model: ConnectPort X2
Firmware: 2.6.4 (Version 82001596_A 09/27/2007)
POST: 1.1.3 (release_82001229_D)

but can't import digicli ...
answered Apr 16, 2008 by futnuh New to the Community (14 points)
0 votes
Based on the change histories for the X2 firmware, it appears that the first version of X2 firmware to incorporate the digicli module is "B", which is currently pending release. I do not, however, know the release schedule... contacting Digi sales or technical support directly would be a good way to try to determine this information.
answered Apr 16, 2008 by 52637p Community Contributor (59 points)
0 votes
The rev. B firmwares are now available on the Support website for both the Ethernet and Wi-Fi variants of the ConnectPort X2.
answered Apr 21, 2008 by Admin Veteran of the Digi Community (732 points)
0 votes
Thanks for the "heads-up" ...
answered Apr 22, 2008 by futnuh New to the Community (14 points)
0 votes
Can you confirm that the X2 *doesn't* have a "set time" or "set date" command?
answered Jun 2, 2008 by futnuh New to the Community (14 points)
0 votes
The X2 does not have a "set time" command.
answered Jun 2, 2008 by 52637p Community Contributor (59 points)
...