-3

time.time() will give current Timestamp, I just want to get timestamp of 11PM or any time.

I need this to compare when time.time() == 11PM and then perform some task.

Learnings
  • 2,450
  • 5
  • 30
  • 47

1 Answers1

-1

Below script working:

import datetime, time

now = datetime.datetime.now()
time_to_change = now.replace(hour=23, minute=50, second=0, microsecond=0)
chepner
  • 446,329
  • 63
  • 468
  • 610
Learnings
  • 2,450
  • 5
  • 30
  • 47