7 print "Usage: %s TimeUpdates|TimezoneUpdates manual|auto" % (sys.argv[0])
11 def make_variant(string):
12 return dbus.String(string, variant_level=1)
15 if (len(sys.argv) != 3):
18 if (sys.argv[1] != "TimeUpdates" and sys.argv[1] != "TimezoneUpdates"):
21 if (sys.argv[2] != "manual" and sys.argv[2] != "auto"):
24 bus = dbus.SystemBus()
26 clock = dbus.Interface(bus.get_object('net.connman', '/'),
29 print "Setting %s to %s" % (sys.argv[1], sys.argv[2])
31 clock.SetProperty(sys.argv[1], make_variant(sys.argv[2]),
32 signature=dbus.Signature('sv'))