Answer the question
In order to leave comments, you need to log in
How to display unix timestamp today(now) and 24 hours ago?
Good afternoon, you need to somehow display the time now and 24 hours ago? How to do it?
int(time.time()) - displays the time now, but how to find out the time 24 hours from this point?
Answer the question
In order to leave comments, you need to log in
For example, subtract the number of seconds in a day from time.time()
now = time.time()
res = now - (24 * 60 * 60)
time.ctime(now)
'Wed Aug 5 12:57:04 2020'
time.ctime(res)
'Tue Aug 4 12:57:04 2020'
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question