擅长:python、mysql、java
<p>使用<a href="https://docs.python.org/3/library/datetime.html#datetime.datetime.replace" rel="noreferrer">^{<cd1>} method</a>基于现有对象生成新的<code>datetime</code>对象:</p>
<pre><code>tomorrow = tomorrow.replace(hour=12)
</code></pre>
<blockquote>
<p>Return a datetime with the same attributes, except for those attributes given new values by whichever keyword arguments are specified. Note that <code>tzinfo=None</code> can be specified to create a naive datetime from an aware datetime with no conversion of date and time data.</p>
</blockquote>