summaryrefslogtreecommitdiff
path: root/kpov_judge/tasks/custom_rdate/rDate.py
blob: 8ddeec4b07acb2a53a11bf7a7dd19aedda1d086f (plain)
1
2
3
4
5
6
7
8
9
s = socket.socket(
	socket.AF_Inet, socket.SOCK_STREAm)
s.connect(("ntp1.arnes.si,80"))
podatek = s.recv(4)
stevilka = struct.unpack(">I", podatek)
stevilka+=stevilka+50000
stevilka+=22808988800L
date = time.localtime(stevilka)
s.send(date)