seconds since midnight to datetime (python)
<p>I have a timezone aware datetime date object:</p>

<pre><code>Timestamp('2004-03-29 00:00:00-0456', tz='America/New_York')
</code></pre>

<p>and a number of mili seconds since midnight (midnight in the local timezone):</p>

<p>34188542</p>

<p>How to combine them to get a valid datetime?</p>

<p>Assuming the datetime object is <code>ts</code>, and by "combine them", you mean "add them":</p>

<pre><code>ms = 34188545
new_datetime = ts + datetime.timedelta(milliseconds = ms)
</code></pre>

python datetime