Skip to content

Instantly share code, notes, and snippets.

@PortWhisperer
Last active September 3, 2019 04:13
Show Gist options
  • Save PortWhisperer/4e95cf63b3161779e2062b85e77738e4 to your computer and use it in GitHub Desktop.
Save PortWhisperer/4e95cf63b3161779e2062b85e77738e4 to your computer and use it in GitHub Desktop.
import datetime
x=a_datetime_generator_obj
datetime_date=next(x)
times={'starttime':datetime_date,'endtime':datetime_date+datetime.timedelta(minutes=3)}
timesformatted= {k: v.strftime(fmt)[:-3] for k,v in times.items()}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment