summaryrefslogtreecommitdiff
path: root/kpov_judge/tasks/custom_rdate
diff options
context:
space:
mode:
Diffstat (limited to 'kpov_judge/tasks/custom_rdate')
-rw-r--r--kpov_judge/tasks/custom_rdate/rDate.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/kpov_judge/tasks/custom_rdate/rDate.py b/kpov_judge/tasks/custom_rdate/rDate.py
new file mode 100644
index 0000000..8ddeec4
--- /dev/null
+++ b/kpov_judge/tasks/custom_rdate/rDate.py
@@ -0,0 +1,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)