Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- date_of_today=datetime.today().strftime('%d/%b/%Y')
- dt = datetime.strptime(date_of_today, '%d/%b/%Y')
- dt_start = dt - timedelta(days=dt.weekday())
- dt_end = dt_start + timedelta(days=6)
- start = int(dt_start.replace(tzinfo=timezone.utc).timestamp())
- end = int(dt_end.replace(tzinfo=timezone.utc).timestamp())
- end = int(dt_end.replace(tzinfo=timezone.utc).timestamp().microseconds)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement