summaryrefslogtreecommitdiff
path: root/test/set-global-timeservers
blob: d7551a110b3ce89f36d59d5a1e28d6b3e5811de0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/usr/bin/python

import sys
import dbus

if (len(sys.argv) < 1):
	print "Usage: %s [timeserver*]" % (sys.argv[0])
	sys.exit(1)

bus = dbus.SystemBus()

clock = dbus.Interface(bus.get_object('net.connman', '/'),
					'net.connman.Clock')

print "Setting timeserver to %s" % (sys.argv[1:])

clock.SetProperty("Timeservers", dbus.Array(sys.argv[1:],
					signature=dbus.Signature('s')))