1
This commit is contained in:
parent
29a9b832ba
commit
b4ea03b447
@ -1,6 +1,8 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
#!/usr/bin/python
|
#!/usr/bin/python
|
||||||
|
|
||||||
|
import binascii
|
||||||
|
|
||||||
def xPrint(text):
|
def xPrint(text):
|
||||||
print(text, flush=True)
|
print(text, flush=True)
|
||||||
|
|
||||||
@ -8,3 +10,7 @@ def getDaySeconds(time_val, incdays):
|
|||||||
time_zone = 8
|
time_zone = 8
|
||||||
return int((time_val + time_zone * 3600)/3600/24 + incdays) * 3600 * 24 - 3600 * time_zone;
|
return int((time_val + time_zone * 3600)/3600/24 + incdays) * 3600 * 24 - 3600 * time_zone;
|
||||||
|
|
||||||
|
def crc32(data):
|
||||||
|
hash_code = binascii.crc32(data)
|
||||||
|
assert hash_code >= 0
|
||||||
|
return hash_code
|
||||||
|
Loading…
x
Reference in New Issue
Block a user