Hi SZ readers!
The code above was not working anymore today since the ID calculation went wrong.
Actually the ID is just built by adding 86400 for each passing day. The corrected code is written below.
Bye!
-----
ID examples:
1422486000 29.Jan. (d29)
1423004400 04.Feb. (d35)
#P.S. 03.02.15
#BEG
d = 86400 #id delta between two days
d29 = 1422486000 #start id @ day 29
now = datetime.now()
dy = int(strftime('%j'))
dyt = dy + 1 # day of the year tomorrow
dg = dyt - 29
id_d = d * dg
id = d29 + id_d
#END
|