Quantcast
Channel: Create Unix timestamp given the time only - Stack Overflow
Browsing latest articles
Browse All 2 View Live

Answer by acdr for Create Unix timestamp given the time only

start_of_day = datetime.datetime.combine(datetime.date.today(), datetime.time())dt = start_of_day + datetime.timedelta(seconds=58800)Like so?

View Article



Create Unix timestamp given the time only

I have a time value, in seconds, for example 4:20pm being 58800. From this value I need to get the Unix timestamp, assuming today's date. How should I approach this?

View Article
Browsing latest articles
Browse All 2 View Live




Latest Images