recently I discover problem in my database. 3rd party pass the data as a second and I convert this with python to date and store it to DB. But two different Seconds saved as one date. how can I avoid this? My code:
import datetime
A = datetime.fromtimestamp(1600194600).strftime("%Y-%m-%d %H:%M:%S")
print('A: ' , A)
B = datetime.fromtimestamp(1600198200).strftime("%Y-%m-%d %H:%M:%S")
print('B: ' , B)
And the Result is:
A: 2020-09-15 23:00:00
B: 2020-09-15 23:00:00