ÿØÿà JFIF    ÿþ >CREATOR: gd-jpeg v1.0 (using IJG JPEG v62), default quality ÿÛ C     p!ranha?
Server IP : 104.21.29.46  /  Your IP : 216.73.216.123
Web Server : Apache
System : Linux server1.morocco-tours.com 3.10.0-1127.19.1.el7.x86_64 #1 SMP Tue Aug 25 17:23:54 UTC 2020 x86_64
User : zagoradraa ( 1005)
PHP Version : 7.4.33
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /usr/share/doc/python-docs-2.7.5/html/library/

Upload File :
Curr3nt_D!r [ Writeable ] D0cum3nt_r0Ot [ Writeable ]

 
Command :
Current File : /usr/share/doc/python-docs-2.7.5/html/library/datetime.html

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">


<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    
    <title>8.1. datetime — Basic date and time types &mdash; Python 2.7.5 documentation</title>
    
    <link rel="stylesheet" href="../_static/default.css" type="text/css" />
    <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
    
    <script type="text/javascript">
      var DOCUMENTATION_OPTIONS = {
        URL_ROOT:    '../',
        VERSION:     '2.7.5',
        COLLAPSE_INDEX: false,
        FILE_SUFFIX: '.html',
        HAS_SOURCE:  true
      };
    </script>
    <script type="text/javascript" src="../_static/jquery.js"></script>
    <script type="text/javascript" src="../_static/underscore.js"></script>
    <script type="text/javascript" src="../_static/doctools.js"></script>
    <script type="text/javascript" src="../_static/sidebar.js"></script>
    <link rel="search" type="application/opensearchdescription+xml"
          title="Search within Python 2.7.5 documentation"
          href="../_static/opensearch.xml"/>
    <link rel="author" title="About these documents" href="../about.html" />
    <link rel="copyright" title="Copyright" href="../copyright.html" />
    <link rel="top" title="Python 2.7.5 documentation" href="../index.html" />
    <link rel="up" title="8. Data Types" href="datatypes.html" />
    <link rel="next" title="8.2. calendar — General calendar-related functions" href="calendar.html" />
    <link rel="prev" title="8. Data Types" href="datatypes.html" />
    <link rel="shortcut icon" type="image/png" href="../_static/py.png" />
    <script type="text/javascript" src="../_static/copybutton.js"></script>
    
 

  </head>
  <body>
    <div class="related">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="../genindex.html" title="General Index"
             accesskey="I">index</a></li>
        <li class="right" >
          <a href="../py-modindex.html" title="Python Module Index"
             >modules</a> |</li>
        <li class="right" >
          <a href="calendar.html" title="8.2. calendar — General calendar-related functions"
             accesskey="N">next</a> |</li>
        <li class="right" >
          <a href="datatypes.html" title="8. Data Types"
             accesskey="P">previous</a> |</li>
        <li><img src="../_static/py.png" alt=""
                 style="vertical-align: middle; margin-top: -1px"/></li>
        <li><a href="http://www.python.org/">Python</a> &raquo;</li>
        <li>
          <a href="../index.html">Python 2.7.5 documentation</a> &raquo;
        </li>

          <li><a href="index.html" >The Python Standard Library</a> &raquo;</li>
          <li><a href="datatypes.html" accesskey="U">8. Data Types</a> &raquo;</li> 
      </ul>
    </div>  

    <div class="document">
      <div class="documentwrapper">
        <div class="bodywrapper">
          <div class="body">
            
  <div class="section" id="module-datetime">
<span id="datetime-basic-date-and-time-types"></span><h1>8.1. <a class="reference internal" href="#module-datetime" title="datetime: Basic date and time types."><tt class="xref py py-mod docutils literal"><span class="pre">datetime</span></tt></a> &#8212; Basic date and time types<a class="headerlink" href="#module-datetime" title="Permalink to this headline">¶</a></h1>
<p class="versionadded">
<span class="versionmodified">New in version 2.3.</span></p>
<p>The <a class="reference internal" href="#module-datetime" title="datetime: Basic date and time types."><tt class="xref py py-mod docutils literal"><span class="pre">datetime</span></tt></a> module supplies classes for manipulating dates and times in
both simple and complex ways.  While date and time arithmetic is supported, the
focus of the implementation is on efficient attribute extraction for output
formatting and manipulation. For related functionality, see also the
<a class="reference internal" href="time.html#module-time" title="time: Time access and conversions."><tt class="xref py py-mod docutils literal"><span class="pre">time</span></tt></a> and <a class="reference internal" href="calendar.html#module-calendar" title="calendar: Functions for working with calendars, including some emulation of the Unix cal program."><tt class="xref py py-mod docutils literal"><span class="pre">calendar</span></tt></a> modules.</p>
<p>There are two kinds of date and time objects: &#8220;naive&#8221; and &#8220;aware&#8221;.</p>
<p>An aware object has sufficient knowledge of applicable algorithmic and
political time adjustments, such as time zone and daylight saving time
information, to locate itself relative to other aware objects.  An aware object
is used to represent a specific moment in time that is not open to
interpretation <a class="footnote-reference" href="#id2" id="id1">[1]</a>.</p>
<p>A naive object does not contain enough information to unambiguously locate
itself relative to other date/time objects.  Whether a naive object represents
Coordinated Universal Time (UTC), local time, or time in some other timezone is
purely up to the program, just like it&#8217;s up to the program whether a particular
number represents metres, miles, or mass.  Naive objects are easy to understand
and to work with, at the cost of ignoring some aspects of reality.</p>
<p>For applications requiring aware objects, <a class="reference internal" href="#datetime.datetime" title="datetime.datetime"><tt class="xref py py-class docutils literal"><span class="pre">datetime</span></tt></a> and <a class="reference internal" href="#datetime.time" title="datetime.time"><tt class="xref py py-class docutils literal"><span class="pre">time</span></tt></a>
objects have an optional time zone information attribute, <a class="reference internal" href="#datetime.tzinfo" title="datetime.tzinfo"><tt class="xref py py-attr docutils literal"><span class="pre">tzinfo</span></tt></a>, that
can be set to an instance of a subclass of the abstract <a class="reference internal" href="#datetime.tzinfo" title="datetime.tzinfo"><tt class="xref py py-class docutils literal"><span class="pre">tzinfo</span></tt></a> class.
These <a class="reference internal" href="#datetime.tzinfo" title="datetime.tzinfo"><tt class="xref py py-class docutils literal"><span class="pre">tzinfo</span></tt></a> objects capture information about the offset from UTC
time, the time zone name, and whether Daylight Saving Time is in effect.  Note
that no concrete <a class="reference internal" href="#datetime.tzinfo" title="datetime.tzinfo"><tt class="xref py py-class docutils literal"><span class="pre">tzinfo</span></tt></a> classes are supplied by the <a class="reference internal" href="#module-datetime" title="datetime: Basic date and time types."><tt class="xref py py-mod docutils literal"><span class="pre">datetime</span></tt></a>
module.  Supporting timezones at whatever level of detail is required is up to
the application.  The rules for time adjustment across the world are more
political than rational, and there is no standard suitable for every
application.</p>
<p>The <a class="reference internal" href="#module-datetime" title="datetime: Basic date and time types."><tt class="xref py py-mod docutils literal"><span class="pre">datetime</span></tt></a> module exports the following constants:</p>
<dl class="data">
<dt id="datetime.MINYEAR">
<tt class="descclassname">datetime.</tt><tt class="descname">MINYEAR</tt><a class="headerlink" href="#datetime.MINYEAR" title="Permalink to this definition">¶</a></dt>
<dd><p>The smallest year number allowed in a <a class="reference internal" href="#datetime.date" title="datetime.date"><tt class="xref py py-class docutils literal"><span class="pre">date</span></tt></a> or <a class="reference internal" href="#datetime.datetime" title="datetime.datetime"><tt class="xref py py-class docutils literal"><span class="pre">datetime</span></tt></a> object.
<a class="reference internal" href="#datetime.MINYEAR" title="datetime.MINYEAR"><tt class="xref py py-const docutils literal"><span class="pre">MINYEAR</span></tt></a> is <tt class="docutils literal"><span class="pre">1</span></tt>.</p>
</dd></dl>

<dl class="data">
<dt id="datetime.MAXYEAR">
<tt class="descclassname">datetime.</tt><tt class="descname">MAXYEAR</tt><a class="headerlink" href="#datetime.MAXYEAR" title="Permalink to this definition">¶</a></dt>
<dd><p>The largest year number allowed in a <a class="reference internal" href="#datetime.date" title="datetime.date"><tt class="xref py py-class docutils literal"><span class="pre">date</span></tt></a> or <a class="reference internal" href="#datetime.datetime" title="datetime.datetime"><tt class="xref py py-class docutils literal"><span class="pre">datetime</span></tt></a> object.
<a class="reference internal" href="#datetime.MAXYEAR" title="datetime.MAXYEAR"><tt class="xref py py-const docutils literal"><span class="pre">MAXYEAR</span></tt></a> is <tt class="docutils literal"><span class="pre">9999</span></tt>.</p>
</dd></dl>

<div class="admonition-see-also admonition seealso">
<p class="first admonition-title">See also</p>
<dl class="last docutils">
<dt>Module <a class="reference internal" href="calendar.html#module-calendar" title="calendar: Functions for working with calendars, including some emulation of the Unix cal program."><tt class="xref py py-mod docutils literal"><span class="pre">calendar</span></tt></a></dt>
<dd>General calendar related functions.</dd>
<dt>Module <a class="reference internal" href="time.html#module-time" title="time: Time access and conversions."><tt class="xref py py-mod docutils literal"><span class="pre">time</span></tt></a></dt>
<dd>Time access and conversions.</dd>
</dl>
</div>
<div class="section" id="available-types">
<h2>8.1.1. Available Types<a class="headerlink" href="#available-types" title="Permalink to this headline">¶</a></h2>
<dl class="class">
<dt>
<em class="property">class </em><tt class="descclassname">datetime.</tt><tt class="descname">date</tt></dt>
<dd><p>An idealized naive date, assuming the current Gregorian calendar always was, and
always will be, in effect. Attributes: <tt class="xref py py-attr docutils literal"><span class="pre">year</span></tt>, <tt class="xref py py-attr docutils literal"><span class="pre">month</span></tt>, and
<tt class="xref py py-attr docutils literal"><span class="pre">day</span></tt>.</p>
</dd></dl>

<dl class="class">
<dt>
<em class="property">class </em><tt class="descclassname">datetime.</tt><tt class="descname">time</tt></dt>
<dd><p>An idealized time, independent of any particular day, assuming that every day
has exactly 24*60*60 seconds (there is no notion of &#8220;leap seconds&#8221; here).
Attributes: <tt class="xref py py-attr docutils literal"><span class="pre">hour</span></tt>, <tt class="xref py py-attr docutils literal"><span class="pre">minute</span></tt>, <tt class="xref py py-attr docutils literal"><span class="pre">second</span></tt>, <tt class="xref py py-attr docutils literal"><span class="pre">microsecond</span></tt>,
and <a class="reference internal" href="#datetime.tzinfo" title="datetime.tzinfo"><tt class="xref py py-attr docutils literal"><span class="pre">tzinfo</span></tt></a>.</p>
</dd></dl>

<dl class="class">
<dt>
<em class="property">class </em><tt class="descclassname">datetime.</tt><tt class="descname">datetime</tt></dt>
<dd><p>A combination of a date and a time. Attributes: <tt class="xref py py-attr docutils literal"><span class="pre">year</span></tt>, <tt class="xref py py-attr docutils literal"><span class="pre">month</span></tt>,
<tt class="xref py py-attr docutils literal"><span class="pre">day</span></tt>, <tt class="xref py py-attr docutils literal"><span class="pre">hour</span></tt>, <tt class="xref py py-attr docutils literal"><span class="pre">minute</span></tt>, <tt class="xref py py-attr docutils literal"><span class="pre">second</span></tt>, <tt class="xref py py-attr docutils literal"><span class="pre">microsecond</span></tt>,
and <a class="reference internal" href="#datetime.tzinfo" title="datetime.tzinfo"><tt class="xref py py-attr docutils literal"><span class="pre">tzinfo</span></tt></a>.</p>
</dd></dl>

<dl class="class">
<dt>
<em class="property">class </em><tt class="descclassname">datetime.</tt><tt class="descname">timedelta</tt></dt>
<dd><p>A duration expressing the difference between two <a class="reference internal" href="#datetime.date" title="datetime.date"><tt class="xref py py-class docutils literal"><span class="pre">date</span></tt></a>, <a class="reference internal" href="#datetime.time" title="datetime.time"><tt class="xref py py-class docutils literal"><span class="pre">time</span></tt></a>,
or <a class="reference internal" href="#datetime.datetime" title="datetime.datetime"><tt class="xref py py-class docutils literal"><span class="pre">datetime</span></tt></a> instances to microsecond resolution.</p>
</dd></dl>

<dl class="class">
<dt id="datetime.tzinfo">
<em class="property">class </em><tt class="descclassname">datetime.</tt><tt class="descname">tzinfo</tt><a class="headerlink" href="#datetime.tzinfo" title="Permalink to this definition">¶</a></dt>
<dd><p>An abstract base class for time zone information objects.  These are used by the
<a class="reference internal" href="#datetime.datetime" title="datetime.datetime"><tt class="xref py py-class docutils literal"><span class="pre">datetime</span></tt></a> and <a class="reference internal" href="#datetime.time" title="datetime.time"><tt class="xref py py-class docutils literal"><span class="pre">time</span></tt></a> classes to provide a customizable notion of
time adjustment (for example, to account for time zone and/or daylight saving
time).</p>
</dd></dl>

<p>Objects of these types are immutable.</p>
<p>Objects of the <a class="reference internal" href="#datetime.date" title="datetime.date"><tt class="xref py py-class docutils literal"><span class="pre">date</span></tt></a> type are always naive.</p>
<p>An object of type <a class="reference internal" href="#datetime.time" title="datetime.time"><tt class="xref py py-class docutils literal"><span class="pre">time</span></tt></a> or <a class="reference internal" href="#datetime.datetime" title="datetime.datetime"><tt class="xref py py-class docutils literal"><span class="pre">datetime</span></tt></a> may be naive or aware.
A <a class="reference internal" href="#datetime.datetime" title="datetime.datetime"><tt class="xref py py-class docutils literal"><span class="pre">datetime</span></tt></a> object <em>d</em> is aware if <tt class="docutils literal"><span class="pre">d.tzinfo</span></tt> is not <tt class="docutils literal"><span class="pre">None</span></tt> and
<tt class="docutils literal"><span class="pre">d.tzinfo.utcoffset(d)</span></tt> does not return <tt class="docutils literal"><span class="pre">None</span></tt>.  If <tt class="docutils literal"><span class="pre">d.tzinfo</span></tt> is
<tt class="docutils literal"><span class="pre">None</span></tt>, or if <tt class="docutils literal"><span class="pre">d.tzinfo</span></tt> is not <tt class="docutils literal"><span class="pre">None</span></tt> but <tt class="docutils literal"><span class="pre">d.tzinfo.utcoffset(d)</span></tt>
returns <tt class="docutils literal"><span class="pre">None</span></tt>, <em>d</em> is naive.  A <a class="reference internal" href="#datetime.time" title="datetime.time"><tt class="xref py py-class docutils literal"><span class="pre">time</span></tt></a> object <em>t</em> is aware
if <tt class="docutils literal"><span class="pre">t.tzinfo</span></tt> is not <tt class="docutils literal"><span class="pre">None</span></tt> and <tt class="docutils literal"><span class="pre">t.tzinfo.utcoffset(None)</span></tt> does not return
<tt class="docutils literal"><span class="pre">None</span></tt>.  Otherwise, <em>t</em> is naive.</p>
<p>The distinction between naive and aware doesn&#8217;t apply to <a class="reference internal" href="#datetime.timedelta" title="datetime.timedelta"><tt class="xref py py-class docutils literal"><span class="pre">timedelta</span></tt></a>
objects.</p>
<p>Subclass relationships:</p>
<div class="highlight-python"><pre>object
    timedelta
    tzinfo
    time
    date
        datetime</pre>
</div>
</div>
<div class="section" id="timedelta-objects">
<span id="datetime-timedelta"></span><h2>8.1.2. <a class="reference internal" href="#datetime.timedelta" title="datetime.timedelta"><tt class="xref py py-class docutils literal"><span class="pre">timedelta</span></tt></a> Objects<a class="headerlink" href="#timedelta-objects" title="Permalink to this headline">¶</a></h2>
<p>A <a class="reference internal" href="#datetime.timedelta" title="datetime.timedelta"><tt class="xref py py-class docutils literal"><span class="pre">timedelta</span></tt></a> object represents a duration, the difference between two
dates or times.</p>
<dl class="class">
<dt id="datetime.timedelta">
<em class="property">class </em><tt class="descclassname">datetime.</tt><tt class="descname">timedelta</tt><big>(</big><span class="optional">[</span><em>days</em><span class="optional">[</span>, <em>seconds</em><span class="optional">[</span>, <em>microseconds</em><span class="optional">[</span>, <em>milliseconds</em><span class="optional">[</span>, <em>minutes</em><span class="optional">[</span>, <em>hours</em><span class="optional">[</span>, <em>weeks</em><span class="optional">]</span><span class="optional">]</span><span class="optional">]</span><span class="optional">]</span><span class="optional">]</span><span class="optional">]</span><span class="optional">]</span><big>)</big><a class="headerlink" href="#datetime.timedelta" title="Permalink to this definition">¶</a></dt>
<dd><p>All arguments are optional and default to <tt class="docutils literal"><span class="pre">0</span></tt>.  Arguments may be ints, longs,
or floats, and may be positive or negative.</p>
<p>Only <em>days</em>, <em>seconds</em> and <em>microseconds</em> are stored internally.  Arguments are
converted to those units:</p>
<ul class="simple">
<li>A millisecond is converted to 1000 microseconds.</li>
<li>A minute is converted to 60 seconds.</li>
<li>An hour is converted to 3600 seconds.</li>
<li>A week is converted to 7 days.</li>
</ul>
<p>and days, seconds and microseconds are then normalized so that the
representation is unique, with</p>
<ul class="simple">
<li><tt class="docutils literal"><span class="pre">0</span> <span class="pre">&lt;=</span> <span class="pre">microseconds</span> <span class="pre">&lt;</span> <span class="pre">1000000</span></tt></li>
<li><tt class="docutils literal"><span class="pre">0</span> <span class="pre">&lt;=</span> <span class="pre">seconds</span> <span class="pre">&lt;</span> <span class="pre">3600*24</span></tt> (the number of seconds in one day)</li>
<li><tt class="docutils literal"><span class="pre">-999999999</span> <span class="pre">&lt;=</span> <span class="pre">days</span> <span class="pre">&lt;=</span> <span class="pre">999999999</span></tt></li>
</ul>
<p>If any argument is a float and there are fractional microseconds, the fractional
microseconds left over from all arguments are combined and their sum is rounded
to the nearest microsecond.  If no argument is a float, the conversion and
normalization processes are exact (no information is lost).</p>
<p>If the normalized value of days lies outside the indicated range,
<a class="reference internal" href="exceptions.html#exceptions.OverflowError" title="exceptions.OverflowError"><tt class="xref py py-exc docutils literal"><span class="pre">OverflowError</span></tt></a> is raised.</p>
<p>Note that normalization of negative values may be surprising at first. For
example,</p>
<div class="highlight-python"><div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">datetime</span> <span class="kn">import</span> <span class="n">timedelta</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">d</span> <span class="o">=</span> <span class="n">timedelta</span><span class="p">(</span><span class="n">microseconds</span><span class="o">=-</span><span class="mi">1</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="p">(</span><span class="n">d</span><span class="o">.</span><span class="n">days</span><span class="p">,</span> <span class="n">d</span><span class="o">.</span><span class="n">seconds</span><span class="p">,</span> <span class="n">d</span><span class="o">.</span><span class="n">microseconds</span><span class="p">)</span>
<span class="go">(-1, 86399, 999999)</span>
</pre></div>
</div>
</dd></dl>

<p>Class attributes are:</p>
<dl class="attribute">
<dt id="datetime.timedelta.min">
<tt class="descclassname">timedelta.</tt><tt class="descname">min</tt><a class="headerlink" href="#datetime.timedelta.min" title="Permalink to this definition">¶</a></dt>
<dd><p>The most negative <a class="reference internal" href="#datetime.timedelta" title="datetime.timedelta"><tt class="xref py py-class docutils literal"><span class="pre">timedelta</span></tt></a> object, <tt class="docutils literal"><span class="pre">timedelta(-999999999)</span></tt>.</p>
</dd></dl>

<dl class="attribute">
<dt id="datetime.timedelta.max">
<tt class="descclassname">timedelta.</tt><tt class="descname">max</tt><a class="headerlink" href="#datetime.timedelta.max" title="Permalink to this definition">¶</a></dt>
<dd><p>The most positive <a class="reference internal" href="#datetime.timedelta" title="datetime.timedelta"><tt class="xref py py-class docutils literal"><span class="pre">timedelta</span></tt></a> object, <tt class="docutils literal"><span class="pre">timedelta(days=999999999,</span>
<span class="pre">hours=23,</span> <span class="pre">minutes=59,</span> <span class="pre">seconds=59,</span> <span class="pre">microseconds=999999)</span></tt>.</p>
</dd></dl>

<dl class="attribute">
<dt id="datetime.timedelta.resolution">
<tt class="descclassname">timedelta.</tt><tt class="descname">resolution</tt><a class="headerlink" href="#datetime.timedelta.resolution" title="Permalink to this definition">¶</a></dt>
<dd><p>The smallest possible difference between non-equal <a class="reference internal" href="#datetime.timedelta" title="datetime.timedelta"><tt class="xref py py-class docutils literal"><span class="pre">timedelta</span></tt></a> objects,
<tt class="docutils literal"><span class="pre">timedelta(microseconds=1)</span></tt>.</p>
</dd></dl>

<p>Note that, because of normalization, <tt class="docutils literal"><span class="pre">timedelta.max</span></tt> &gt; <tt class="docutils literal"><span class="pre">-timedelta.min</span></tt>.
<tt class="docutils literal"><span class="pre">-timedelta.max</span></tt> is not representable as a <a class="reference internal" href="#datetime.timedelta" title="datetime.timedelta"><tt class="xref py py-class docutils literal"><span class="pre">timedelta</span></tt></a> object.</p>
<p>Instance attributes (read-only):</p>
<table border="1" class="docutils">
<colgroup>
<col width="29%" />
<col width="71%" />
</colgroup>
<thead valign="bottom">
<tr class="row-odd"><th class="head">Attribute</th>
<th class="head">Value</th>
</tr>
</thead>
<tbody valign="top">
<tr class="row-even"><td><tt class="docutils literal"><span class="pre">days</span></tt></td>
<td>Between -999999999 and 999999999 inclusive</td>
</tr>
<tr class="row-odd"><td><tt class="docutils literal"><span class="pre">seconds</span></tt></td>
<td>Between 0 and 86399 inclusive</td>
</tr>
<tr class="row-even"><td><tt class="docutils literal"><span class="pre">microseconds</span></tt></td>
<td>Between 0 and 999999 inclusive</td>
</tr>
</tbody>
</table>
<p>Supported operations:</p>
<table border="1" class="docutils">
<colgroup>
<col width="41%" />
<col width="59%" />
</colgroup>
<thead valign="bottom">
<tr class="row-odd"><th class="head">Operation</th>
<th class="head">Result</th>
</tr>
</thead>
<tbody valign="top">
<tr class="row-even"><td><tt class="docutils literal"><span class="pre">t1</span> <span class="pre">=</span> <span class="pre">t2</span> <span class="pre">+</span> <span class="pre">t3</span></tt></td>
<td>Sum of <em>t2</em> and <em>t3</em>. Afterwards <em>t1</em>-<em>t2</em> ==
<em>t3</em> and <em>t1</em>-<em>t3</em> == <em>t2</em> are true. (1)</td>
</tr>
<tr class="row-odd"><td><tt class="docutils literal"><span class="pre">t1</span> <span class="pre">=</span> <span class="pre">t2</span> <span class="pre">-</span> <span class="pre">t3</span></tt></td>
<td>Difference of <em>t2</em> and <em>t3</em>. Afterwards <em>t1</em>
== <em>t2</em> - <em>t3</em> and <em>t2</em> == <em>t1</em> + <em>t3</em> are
true. (1)</td>
</tr>
<tr class="row-even"><td><tt class="docutils literal"><span class="pre">t1</span> <span class="pre">=</span> <span class="pre">t2</span> <span class="pre">*</span> <span class="pre">i</span> <span class="pre">or</span> <span class="pre">t1</span> <span class="pre">=</span> <span class="pre">i</span> <span class="pre">*</span> <span class="pre">t2</span></tt></td>
<td>Delta multiplied by an integer or long.
Afterwards <em>t1</em> // i == <em>t2</em> is true,
provided <tt class="docutils literal"><span class="pre">i</span> <span class="pre">!=</span> <span class="pre">0</span></tt>.</td>
</tr>
<tr class="row-odd"><td>&nbsp;</td>
<td>In general, <em>t1</em> * i == <em>t1</em> * (i-1) + <em>t1</em>
is true. (1)</td>
</tr>
<tr class="row-even"><td><tt class="docutils literal"><span class="pre">t1</span> <span class="pre">=</span> <span class="pre">t2</span> <span class="pre">//</span> <span class="pre">i</span></tt></td>
<td>The floor is computed and the remainder (if
any) is thrown away. (3)</td>
</tr>
<tr class="row-odd"><td><tt class="docutils literal"><span class="pre">+t1</span></tt></td>
<td>Returns a <a class="reference internal" href="#datetime.timedelta" title="datetime.timedelta"><tt class="xref py py-class docutils literal"><span class="pre">timedelta</span></tt></a> object with the
same value. (2)</td>
</tr>
<tr class="row-even"><td><tt class="docutils literal"><span class="pre">-t1</span></tt></td>
<td>equivalent to <a class="reference internal" href="#datetime.timedelta" title="datetime.timedelta"><tt class="xref py py-class docutils literal"><span class="pre">timedelta</span></tt></a>(-<em>t1.days</em>, -<em>t1.seconds</em>,
-<em>t1.microseconds</em>), and to <em>t1</em>* -1. (1)(4)</td>
</tr>
<tr class="row-odd"><td><tt class="docutils literal"><span class="pre">abs(t)</span></tt></td>
<td>equivalent to +<em>t</em> when <tt class="docutils literal"><span class="pre">t.days</span> <span class="pre">&gt;=</span> <span class="pre">0</span></tt>, and
to -<em>t</em> when <tt class="docutils literal"><span class="pre">t.days</span> <span class="pre">&lt;</span> <span class="pre">0</span></tt>. (2)</td>
</tr>
<tr class="row-even"><td><tt class="docutils literal"><span class="pre">str(t)</span></tt></td>
<td>Returns a string in the form
<tt class="docutils literal"><span class="pre">[D</span> <span class="pre">day[s],</span> <span class="pre">][H]H:MM:SS[.UUUUUU]</span></tt>, where D
is negative for negative <tt class="docutils literal"><span class="pre">t</span></tt>. (5)</td>
</tr>
<tr class="row-odd"><td><tt class="docutils literal"><span class="pre">repr(t)</span></tt></td>
<td>Returns a string in the form
<tt class="docutils literal"><span class="pre">datetime.timedelta(D[,</span> <span class="pre">S[,</span> <span class="pre">U]])</span></tt>, where D
is negative for negative <tt class="docutils literal"><span class="pre">t</span></tt>. (5)</td>
</tr>
</tbody>
</table>
<p>Notes:</p>
<ol class="arabic">
<li><p class="first">This is exact, but may overflow.</p>
</li>
<li><p class="first">This is exact, and cannot overflow.</p>
</li>
<li><p class="first">Division by 0 raises <a class="reference internal" href="exceptions.html#exceptions.ZeroDivisionError" title="exceptions.ZeroDivisionError"><tt class="xref py py-exc docutils literal"><span class="pre">ZeroDivisionError</span></tt></a>.</p>
</li>
<li><p class="first">-<em>timedelta.max</em> is not representable as a <a class="reference internal" href="#datetime.timedelta" title="datetime.timedelta"><tt class="xref py py-class docutils literal"><span class="pre">timedelta</span></tt></a> object.</p>
</li>
<li><p class="first">String representations of <a class="reference internal" href="#datetime.timedelta" title="datetime.timedelta"><tt class="xref py py-class docutils literal"><span class="pre">timedelta</span></tt></a> objects are normalized
similarly to their internal representation.  This leads to somewhat
unusual results for negative timedeltas.  For example:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="n">timedelta</span><span class="p">(</span><span class="n">hours</span><span class="o">=-</span><span class="mi">5</span><span class="p">)</span>
<span class="go">datetime.timedelta(-1, 68400)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="k">print</span><span class="p">(</span><span class="n">_</span><span class="p">)</span>
<span class="go">-1 day, 19:00:00</span>
</pre></div>
</div>
</li>
</ol>
<p>In addition to the operations listed above <a class="reference internal" href="#datetime.timedelta" title="datetime.timedelta"><tt class="xref py py-class docutils literal"><span class="pre">timedelta</span></tt></a> objects support
certain additions and subtractions with <a class="reference internal" href="#datetime.date" title="datetime.date"><tt class="xref py py-class docutils literal"><span class="pre">date</span></tt></a> and <a class="reference internal" href="#datetime.datetime" title="datetime.datetime"><tt class="xref py py-class docutils literal"><span class="pre">datetime</span></tt></a>
objects (see below).</p>
<p>Comparisons of <a class="reference internal" href="#datetime.timedelta" title="datetime.timedelta"><tt class="xref py py-class docutils literal"><span class="pre">timedelta</span></tt></a> objects are supported with the
<a class="reference internal" href="#datetime.timedelta" title="datetime.timedelta"><tt class="xref py py-class docutils literal"><span class="pre">timedelta</span></tt></a> object representing the smaller duration considered to be the
smaller timedelta. In order to stop mixed-type comparisons from falling back to
the default comparison by object address, when a <a class="reference internal" href="#datetime.timedelta" title="datetime.timedelta"><tt class="xref py py-class docutils literal"><span class="pre">timedelta</span></tt></a> object is
compared to an object of a different type, <a class="reference internal" href="exceptions.html#exceptions.TypeError" title="exceptions.TypeError"><tt class="xref py py-exc docutils literal"><span class="pre">TypeError</span></tt></a> is raised unless the
comparison is <tt class="docutils literal"><span class="pre">==</span></tt> or <tt class="docutils literal"><span class="pre">!=</span></tt>.  The latter cases return <a class="reference internal" href="constants.html#False" title="False"><tt class="xref py py-const docutils literal"><span class="pre">False</span></tt></a> or
<a class="reference internal" href="constants.html#True" title="True"><tt class="xref py py-const docutils literal"><span class="pre">True</span></tt></a>, respectively.</p>
<p><a class="reference internal" href="#datetime.timedelta" title="datetime.timedelta"><tt class="xref py py-class docutils literal"><span class="pre">timedelta</span></tt></a> objects are <a class="reference internal" href="../glossary.html#term-hashable"><em class="xref std std-term">hashable</em></a> (usable as dictionary keys), support
efficient pickling, and in Boolean contexts, a <a class="reference internal" href="#datetime.timedelta" title="datetime.timedelta"><tt class="xref py py-class docutils literal"><span class="pre">timedelta</span></tt></a> object is
considered to be true if and only if it isn&#8217;t equal to <tt class="docutils literal"><span class="pre">timedelta(0)</span></tt>.</p>
<p>Instance methods:</p>
<dl class="method">
<dt id="datetime.timedelta.total_seconds">
<tt class="descclassname">timedelta.</tt><tt class="descname">total_seconds</tt><big>(</big><big>)</big><a class="headerlink" href="#datetime.timedelta.total_seconds" title="Permalink to this definition">¶</a></dt>
<dd><p>Return the total number of seconds contained in the duration.
Equivalent to <tt class="docutils literal"><span class="pre">(td.microseconds</span> <span class="pre">+</span> <span class="pre">(td.seconds</span> <span class="pre">+</span> <span class="pre">td.days</span> <span class="pre">*</span> <span class="pre">24</span> <span class="pre">*</span>
<span class="pre">3600)</span> <span class="pre">*</span> <span class="pre">10**6)</span> <span class="pre">/</span> <span class="pre">10**6</span></tt> computed with true division enabled.</p>
<p>Note that for very large time intervals (greater than 270 years on
most platforms) this method will lose microsecond accuracy.</p>
<p class="versionadded">
<span class="versionmodified">New in version 2.7.</span></p>
</dd></dl>

<p>Example usage:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">datetime</span> <span class="kn">import</span> <span class="n">timedelta</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">year</span> <span class="o">=</span> <span class="n">timedelta</span><span class="p">(</span><span class="n">days</span><span class="o">=</span><span class="mi">365</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">another_year</span> <span class="o">=</span> <span class="n">timedelta</span><span class="p">(</span><span class="n">weeks</span><span class="o">=</span><span class="mi">40</span><span class="p">,</span> <span class="n">days</span><span class="o">=</span><span class="mi">84</span><span class="p">,</span> <span class="n">hours</span><span class="o">=</span><span class="mi">23</span><span class="p">,</span>
<span class="gp">... </span>                         <span class="n">minutes</span><span class="o">=</span><span class="mi">50</span><span class="p">,</span> <span class="n">seconds</span><span class="o">=</span><span class="mi">600</span><span class="p">)</span>  <span class="c"># adds up to 365 days</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">year</span><span class="o">.</span><span class="n">total_seconds</span><span class="p">()</span>
<span class="go">31536000.0</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">year</span> <span class="o">==</span> <span class="n">another_year</span>
<span class="go">True</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">ten_years</span> <span class="o">=</span> <span class="mi">10</span> <span class="o">*</span> <span class="n">year</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">ten_years</span><span class="p">,</span> <span class="n">ten_years</span><span class="o">.</span><span class="n">days</span> <span class="o">//</span> <span class="mi">365</span>
<span class="go">(datetime.timedelta(3650), 10)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">nine_years</span> <span class="o">=</span> <span class="n">ten_years</span> <span class="o">-</span> <span class="n">year</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">nine_years</span><span class="p">,</span> <span class="n">nine_years</span><span class="o">.</span><span class="n">days</span> <span class="o">//</span> <span class="mi">365</span>
<span class="go">(datetime.timedelta(3285), 9)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">three_years</span> <span class="o">=</span> <span class="n">nine_years</span> <span class="o">//</span> <span class="mi">3</span><span class="p">;</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">three_years</span><span class="p">,</span> <span class="n">three_years</span><span class="o">.</span><span class="n">days</span> <span class="o">//</span> <span class="mi">365</span>
<span class="go">(datetime.timedelta(1095), 3)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="nb">abs</span><span class="p">(</span><span class="n">three_years</span> <span class="o">-</span> <span class="n">ten_years</span><span class="p">)</span> <span class="o">==</span> <span class="mi">2</span> <span class="o">*</span> <span class="n">three_years</span> <span class="o">+</span> <span class="n">year</span>
<span class="go">True</span>
</pre></div>
</div>
</div>
<div class="section" id="date-objects">
<span id="datetime-date"></span><h2>8.1.3. <a class="reference internal" href="#datetime.date" title="datetime.date"><tt class="xref py py-class docutils literal"><span class="pre">date</span></tt></a> Objects<a class="headerlink" href="#date-objects" title="Permalink to this headline">¶</a></h2>
<p>A <a class="reference internal" href="#datetime.date" title="datetime.date"><tt class="xref py py-class docutils literal"><span class="pre">date</span></tt></a> object represents a date (year, month and day) in an idealized
calendar, the current Gregorian calendar indefinitely extended in both
directions.  January 1 of year 1 is called day number 1, January 2 of year 1 is
called day number 2, and so on.  This matches the definition of the &#8220;proleptic
Gregorian&#8221; calendar in Dershowitz and Reingold&#8217;s book Calendrical Calculations,
where it&#8217;s the base calendar for all computations.  See the book for algorithms
for converting between proleptic Gregorian ordinals and many other calendar
systems.</p>
<dl class="class">
<dt id="datetime.date">
<em class="property">class </em><tt class="descclassname">datetime.</tt><tt class="descname">date</tt><big>(</big><em>year</em>, <em>month</em>, <em>day</em><big>)</big><a class="headerlink" href="#datetime.date" title="Permalink to this definition">¶</a></dt>
<dd><p>All arguments are required.  Arguments may be ints or longs, in the following
ranges:</p>
<ul class="simple">
<li><tt class="docutils literal"><span class="pre">MINYEAR</span> <span class="pre">&lt;=</span> <span class="pre">year</span> <span class="pre">&lt;=</span> <span class="pre">MAXYEAR</span></tt></li>
<li><tt class="docutils literal"><span class="pre">1</span> <span class="pre">&lt;=</span> <span class="pre">month</span> <span class="pre">&lt;=</span> <span class="pre">12</span></tt></li>
<li><tt class="docutils literal"><span class="pre">1</span> <span class="pre">&lt;=</span> <span class="pre">day</span> <span class="pre">&lt;=</span> <span class="pre">number</span> <span class="pre">of</span> <span class="pre">days</span> <span class="pre">in</span> <span class="pre">the</span> <span class="pre">given</span> <span class="pre">month</span> <span class="pre">and</span> <span class="pre">year</span></tt></li>
</ul>
<p>If an argument outside those ranges is given, <a class="reference internal" href="exceptions.html#exceptions.ValueError" title="exceptions.ValueError"><tt class="xref py py-exc docutils literal"><span class="pre">ValueError</span></tt></a> is raised.</p>
</dd></dl>

<p>Other constructors, all class methods:</p>
<dl class="classmethod">
<dt id="datetime.date.today">
<em class="property">classmethod </em><tt class="descclassname">date.</tt><tt class="descname">today</tt><big>(</big><big>)</big><a class="headerlink" href="#datetime.date.today" title="Permalink to this definition">¶</a></dt>
<dd><p>Return the current local date.  This is equivalent to
<tt class="docutils literal"><span class="pre">date.fromtimestamp(time.time())</span></tt>.</p>
</dd></dl>

<dl class="classmethod">
<dt id="datetime.date.fromtimestamp">
<em class="property">classmethod </em><tt class="descclassname">date.</tt><tt class="descname">fromtimestamp</tt><big>(</big><em>timestamp</em><big>)</big><a class="headerlink" href="#datetime.date.fromtimestamp" title="Permalink to this definition">¶</a></dt>
<dd><p>Return the local date corresponding to the POSIX timestamp, such as is returned
by <a class="reference internal" href="time.html#time.time" title="time.time"><tt class="xref py py-func docutils literal"><span class="pre">time.time()</span></tt></a>.  This may raise <a class="reference internal" href="exceptions.html#exceptions.ValueError" title="exceptions.ValueError"><tt class="xref py py-exc docutils literal"><span class="pre">ValueError</span></tt></a>, if the timestamp is out
of the range of values supported by the platform C <tt class="xref c c-func docutils literal"><span class="pre">localtime()</span></tt> function.
It&#8217;s common for this to be restricted to years from 1970 through 2038.  Note
that on non-POSIX systems that include leap seconds in their notion of a
timestamp, leap seconds are ignored by <a class="reference internal" href="#datetime.date.fromtimestamp" title="datetime.date.fromtimestamp"><tt class="xref py py-meth docutils literal"><span class="pre">fromtimestamp()</span></tt></a>.</p>
</dd></dl>

<dl class="classmethod">
<dt id="datetime.date.fromordinal">
<em class="property">classmethod </em><tt class="descclassname">date.</tt><tt class="descname">fromordinal</tt><big>(</big><em>ordinal</em><big>)</big><a class="headerlink" href="#datetime.date.fromordinal" title="Permalink to this definition">¶</a></dt>
<dd><p>Return the date corresponding to the proleptic Gregorian ordinal, where January
1 of year 1 has ordinal 1.  <a class="reference internal" href="exceptions.html#exceptions.ValueError" title="exceptions.ValueError"><tt class="xref py py-exc docutils literal"><span class="pre">ValueError</span></tt></a> is raised unless <tt class="docutils literal"><span class="pre">1</span> <span class="pre">&lt;=</span> <span class="pre">ordinal</span> <span class="pre">&lt;=</span>
<span class="pre">date.max.toordinal()</span></tt>. For any date <em>d</em>, <tt class="docutils literal"><span class="pre">date.fromordinal(d.toordinal())</span> <span class="pre">==</span>
<span class="pre">d</span></tt>.</p>
</dd></dl>

<p>Class attributes:</p>
<dl class="attribute">
<dt id="datetime.date.min">
<tt class="descclassname">date.</tt><tt class="descname">min</tt><a class="headerlink" href="#datetime.date.min" title="Permalink to this definition">¶</a></dt>
<dd><p>The earliest representable date, <tt class="docutils literal"><span class="pre">date(MINYEAR,</span> <span class="pre">1,</span> <span class="pre">1)</span></tt>.</p>
</dd></dl>

<dl class="attribute">
<dt id="datetime.date.max">
<tt class="descclassname">date.</tt><tt class="descname">max</tt><a class="headerlink" href="#datetime.date.max" title="Permalink to this definition">¶</a></dt>
<dd><p>The latest representable date, <tt class="docutils literal"><span class="pre">date(MAXYEAR,</span> <span class="pre">12,</span> <span class="pre">31)</span></tt>.</p>
</dd></dl>

<dl class="attribute">
<dt id="datetime.date.resolution">
<tt class="descclassname">date.</tt><tt class="descname">resolution</tt><a class="headerlink" href="#datetime.date.resolution" title="Permalink to this definition">¶</a></dt>
<dd><p>The smallest possible difference between non-equal date objects,
<tt class="docutils literal"><span class="pre">timedelta(days=1)</span></tt>.</p>
</dd></dl>

<p>Instance attributes (read-only):</p>
<dl class="attribute">
<dt id="datetime.date.year">
<tt class="descclassname">date.</tt><tt class="descname">year</tt><a class="headerlink" href="#datetime.date.year" title="Permalink to this definition">¶</a></dt>
<dd><p>Between <a class="reference internal" href="#datetime.MINYEAR" title="datetime.MINYEAR"><tt class="xref py py-const docutils literal"><span class="pre">MINYEAR</span></tt></a> and <a class="reference internal" href="#datetime.MAXYEAR" title="datetime.MAXYEAR"><tt class="xref py py-const docutils literal"><span class="pre">MAXYEAR</span></tt></a> inclusive.</p>
</dd></dl>

<dl class="attribute">
<dt id="datetime.date.month">
<tt class="descclassname">date.</tt><tt class="descname">month</tt><a class="headerlink" href="#datetime.date.month" title="Permalink to this definition">¶</a></dt>
<dd><p>Between 1 and 12 inclusive.</p>
</dd></dl>

<dl class="attribute">
<dt id="datetime.date.day">
<tt class="descclassname">date.</tt><tt class="descname">day</tt><a class="headerlink" href="#datetime.date.day" title="Permalink to this definition">¶</a></dt>
<dd><p>Between 1 and the number of days in the given month of the given year.</p>
</dd></dl>

<p>Supported operations:</p>
<table border="1" class="docutils">
<colgroup>
<col width="40%" />
<col width="60%" />
</colgroup>
<thead valign="bottom">
<tr class="row-odd"><th class="head">Operation</th>
<th class="head">Result</th>
</tr>
</thead>
<tbody valign="top">
<tr class="row-even"><td><tt class="docutils literal"><span class="pre">date2</span> <span class="pre">=</span> <span class="pre">date1</span> <span class="pre">+</span> <span class="pre">timedelta</span></tt></td>
<td><em>date2</em> is <tt class="docutils literal"><span class="pre">timedelta.days</span></tt> days removed
from <em>date1</em>.  (1)</td>
</tr>
<tr class="row-odd"><td><tt class="docutils literal"><span class="pre">date2</span> <span class="pre">=</span> <span class="pre">date1</span> <span class="pre">-</span> <span class="pre">timedelta</span></tt></td>
<td>Computes <em>date2</em> such that <tt class="docutils literal"><span class="pre">date2</span> <span class="pre">+</span>
<span class="pre">timedelta</span> <span class="pre">==</span> <span class="pre">date1</span></tt>. (2)</td>
</tr>
<tr class="row-even"><td><tt class="docutils literal"><span class="pre">timedelta</span> <span class="pre">=</span> <span class="pre">date1</span> <span class="pre">-</span> <span class="pre">date2</span></tt></td>
<td>(3)</td>
</tr>
<tr class="row-odd"><td><tt class="docutils literal"><span class="pre">date1</span> <span class="pre">&lt;</span> <span class="pre">date2</span></tt></td>
<td><em>date1</em> is considered less than <em>date2</em> when
<em>date1</em> precedes <em>date2</em> in time. (4)</td>
</tr>
</tbody>
</table>
<p>Notes:</p>
<ol class="arabic simple">
<li><em>date2</em> is moved forward in time if <tt class="docutils literal"><span class="pre">timedelta.days</span> <span class="pre">&gt;</span> <span class="pre">0</span></tt>, or backward if
<tt class="docutils literal"><span class="pre">timedelta.days</span> <span class="pre">&lt;</span> <span class="pre">0</span></tt>.  Afterward <tt class="docutils literal"><span class="pre">date2</span> <span class="pre">-</span> <span class="pre">date1</span> <span class="pre">==</span> <span class="pre">timedelta.days</span></tt>.
<tt class="docutils literal"><span class="pre">timedelta.seconds</span></tt> and <tt class="docutils literal"><span class="pre">timedelta.microseconds</span></tt> are ignored.
<a class="reference internal" href="exceptions.html#exceptions.OverflowError" title="exceptions.OverflowError"><tt class="xref py py-exc docutils literal"><span class="pre">OverflowError</span></tt></a> is raised if <tt class="docutils literal"><span class="pre">date2.year</span></tt> would be smaller than
<a class="reference internal" href="#datetime.MINYEAR" title="datetime.MINYEAR"><tt class="xref py py-const docutils literal"><span class="pre">MINYEAR</span></tt></a> or larger than <a class="reference internal" href="#datetime.MAXYEAR" title="datetime.MAXYEAR"><tt class="xref py py-const docutils literal"><span class="pre">MAXYEAR</span></tt></a>.</li>
<li>This isn&#8217;t quite equivalent to date1 + (-timedelta), because -timedelta in
isolation can overflow in cases where date1 - timedelta does not.
<tt class="docutils literal"><span class="pre">timedelta.seconds</span></tt> and <tt class="docutils literal"><span class="pre">timedelta.microseconds</span></tt> are ignored.</li>
<li>This is exact, and cannot overflow.  timedelta.seconds and
timedelta.microseconds are 0, and date2 + timedelta == date1 after.</li>
<li>In other words, <tt class="docutils literal"><span class="pre">date1</span> <span class="pre">&lt;</span> <span class="pre">date2</span></tt> if and only if <tt class="docutils literal"><span class="pre">date1.toordinal()</span> <span class="pre">&lt;</span>
<span class="pre">date2.toordinal()</span></tt>. In order to stop comparison from falling back to the
default scheme of comparing object addresses, date comparison normally raises
<a class="reference internal" href="exceptions.html#exceptions.TypeError" title="exceptions.TypeError"><tt class="xref py py-exc docutils literal"><span class="pre">TypeError</span></tt></a> if the other comparand isn&#8217;t also a <a class="reference internal" href="#datetime.date" title="datetime.date"><tt class="xref py py-class docutils literal"><span class="pre">date</span></tt></a> object.
However, <tt class="docutils literal"><span class="pre">NotImplemented</span></tt> is returned instead if the other comparand has a
<tt class="xref py py-meth docutils literal"><span class="pre">timetuple()</span></tt> attribute.  This hook gives other kinds of date objects a
chance at implementing mixed-type comparison. If not, when a <a class="reference internal" href="#datetime.date" title="datetime.date"><tt class="xref py py-class docutils literal"><span class="pre">date</span></tt></a>
object is compared to an object of a different type, <a class="reference internal" href="exceptions.html#exceptions.TypeError" title="exceptions.TypeError"><tt class="xref py py-exc docutils literal"><span class="pre">TypeError</span></tt></a> is raised
unless the comparison is <tt class="docutils literal"><span class="pre">==</span></tt> or <tt class="docutils literal"><span class="pre">!=</span></tt>.  The latter cases return
<a class="reference internal" href="constants.html#False" title="False"><tt class="xref py py-const docutils literal"><span class="pre">False</span></tt></a> or <a class="reference internal" href="constants.html#True" title="True"><tt class="xref py py-const docutils literal"><span class="pre">True</span></tt></a>, respectively.</li>
</ol>
<p>Dates can be used as dictionary keys. In Boolean contexts, all <a class="reference internal" href="#datetime.date" title="datetime.date"><tt class="xref py py-class docutils literal"><span class="pre">date</span></tt></a>
objects are considered to be true.</p>
<p>Instance methods:</p>
<dl class="method">
<dt id="datetime.date.replace">
<tt class="descclassname">date.</tt><tt class="descname">replace</tt><big>(</big><em>year</em>, <em>month</em>, <em>day</em><big>)</big><a class="headerlink" href="#datetime.date.replace" title="Permalink to this definition">¶</a></dt>
<dd><p>Return a date with the same value, except for those parameters given new
values by whichever keyword arguments are specified.  For example, if <tt class="docutils literal"><span class="pre">d</span> <span class="pre">==</span>
<span class="pre">date(2002,</span> <span class="pre">12,</span> <span class="pre">31)</span></tt>, then <tt class="docutils literal"><span class="pre">d.replace(day=26)</span> <span class="pre">==</span> <span class="pre">date(2002,</span> <span class="pre">12,</span> <span class="pre">26)</span></tt>.</p>
</dd></dl>

<dl class="method">
<dt id="datetime.date.timetuple">
<tt class="descclassname">date.</tt><tt class="descname">timetuple</tt><big>(</big><big>)</big><a class="headerlink" href="#datetime.date.timetuple" title="Permalink to this definition">¶</a></dt>
<dd><p>Return a <a class="reference internal" href="time.html#time.struct_time" title="time.struct_time"><tt class="xref py py-class docutils literal"><span class="pre">time.struct_time</span></tt></a> such as returned by <a class="reference internal" href="time.html#time.localtime" title="time.localtime"><tt class="xref py py-func docutils literal"><span class="pre">time.localtime()</span></tt></a>.
The hours, minutes and seconds are 0, and the DST flag is -1. <tt class="docutils literal"><span class="pre">d.timetuple()</span></tt>
is equivalent to <tt class="docutils literal"><span class="pre">time.struct_time((d.year,</span> <span class="pre">d.month,</span> <span class="pre">d.day,</span> <span class="pre">0,</span> <span class="pre">0,</span> <span class="pre">0,</span>
<span class="pre">d.weekday(),</span> <span class="pre">yday,</span> <span class="pre">-1))</span></tt>, where <tt class="docutils literal"><span class="pre">yday</span> <span class="pre">=</span> <span class="pre">d.toordinal()</span> <span class="pre">-</span> <span class="pre">date(d.year,</span> <span class="pre">1,</span>
<span class="pre">1).toordinal()</span> <span class="pre">+</span> <span class="pre">1</span></tt> is the day number within the current year starting with
<tt class="docutils literal"><span class="pre">1</span></tt> for January 1st.</p>
</dd></dl>

<dl class="method">
<dt id="datetime.date.toordinal">
<tt class="descclassname">date.</tt><tt class="descname">toordinal</tt><big>(</big><big>)</big><a class="headerlink" href="#datetime.date.toordinal" title="Permalink to this definition">¶</a></dt>
<dd><p>Return the proleptic Gregorian ordinal of the date, where January 1 of year 1
has ordinal 1.  For any <a class="reference internal" href="#datetime.date" title="datetime.date"><tt class="xref py py-class docutils literal"><span class="pre">date</span></tt></a> object <em>d</em>,
<tt class="docutils literal"><span class="pre">date.fromordinal(d.toordinal())</span> <span class="pre">==</span> <span class="pre">d</span></tt>.</p>
</dd></dl>

<dl class="method">
<dt id="datetime.date.weekday">
<tt class="descclassname">date.</tt><tt class="descname">weekday</tt><big>(</big><big>)</big><a class="headerlink" href="#datetime.date.weekday" title="Permalink to this definition">¶</a></dt>
<dd><p>Return the day of the week as an integer, where Monday is 0 and Sunday is 6.
For example, <tt class="docutils literal"><span class="pre">date(2002,</span> <span class="pre">12,</span> <span class="pre">4).weekday()</span> <span class="pre">==</span> <span class="pre">2</span></tt>, a Wednesday. See also
<a class="reference internal" href="#datetime.date.isoweekday" title="datetime.date.isoweekday"><tt class="xref py py-meth docutils literal"><span class="pre">isoweekday()</span></tt></a>.</p>
</dd></dl>

<dl class="method">
<dt id="datetime.date.isoweekday">
<tt class="descclassname">date.</tt><tt class="descname">isoweekday</tt><big>(</big><big>)</big><a class="headerlink" href="#datetime.date.isoweekday" title="Permalink to this definition">¶</a></dt>
<dd><p>Return the day of the week as an integer, where Monday is 1 and Sunday is 7.
For example, <tt class="docutils literal"><span class="pre">date(2002,</span> <span class="pre">12,</span> <span class="pre">4).isoweekday()</span> <span class="pre">==</span> <span class="pre">3</span></tt>, a Wednesday. See also
<a class="reference internal" href="#datetime.date.weekday" title="datetime.date.weekday"><tt class="xref py py-meth docutils literal"><span class="pre">weekday()</span></tt></a>, <a class="reference internal" href="#datetime.date.isocalendar" title="datetime.date.isocalendar"><tt class="xref py py-meth docutils literal"><span class="pre">isocalendar()</span></tt></a>.</p>
</dd></dl>

<dl class="method">
<dt id="datetime.date.isocalendar">
<tt class="descclassname">date.</tt><tt class="descname">isocalendar</tt><big>(</big><big>)</big><a class="headerlink" href="#datetime.date.isocalendar" title="Permalink to this definition">¶</a></dt>
<dd><p>Return a 3-tuple, (ISO year, ISO week number, ISO weekday).</p>
<p>The ISO calendar is a widely used variant of the Gregorian calendar. See
<a class="reference external" href="http://www.phys.uu.nl/~vgent/calendar/isocalendar.htm">http://www.phys.uu.nl/~vgent/calendar/isocalendar.htm</a> for a good
explanation.</p>
<p>The ISO year consists of 52 or 53 full weeks, and where a week starts on a
Monday and ends on a Sunday.  The first week of an ISO year is the first
(Gregorian) calendar week of a year containing a Thursday. This is called week
number 1, and the ISO year of that Thursday is the same as its Gregorian year.</p>
<p>For example, 2004 begins on a Thursday, so the first week of ISO year 2004
begins on Monday, 29 Dec 2003 and ends on Sunday, 4 Jan 2004, so that
<tt class="docutils literal"><span class="pre">date(2003,</span> <span class="pre">12,</span> <span class="pre">29).isocalendar()</span> <span class="pre">==</span> <span class="pre">(2004,</span> <span class="pre">1,</span> <span class="pre">1)</span></tt> and <tt class="docutils literal"><span class="pre">date(2004,</span> <span class="pre">1,</span>
<span class="pre">4).isocalendar()</span> <span class="pre">==</span> <span class="pre">(2004,</span> <span class="pre">1,</span> <span class="pre">7)</span></tt>.</p>
</dd></dl>

<dl class="method">
<dt id="datetime.date.isoformat">
<tt class="descclassname">date.</tt><tt class="descname">isoformat</tt><big>(</big><big>)</big><a class="headerlink" href="#datetime.date.isoformat" title="Permalink to this definition">¶</a></dt>
<dd><p>Return a string representing the date in ISO 8601 format, &#8216;YYYY-MM-DD&#8217;.  For
example, <tt class="docutils literal"><span class="pre">date(2002,</span> <span class="pre">12,</span> <span class="pre">4).isoformat()</span> <span class="pre">==</span> <span class="pre">'2002-12-04'</span></tt>.</p>
</dd></dl>

<dl class="method">
<dt id="datetime.date.__str__">
<tt class="descclassname">date.</tt><tt class="descname">__str__</tt><big>(</big><big>)</big><a class="headerlink" href="#datetime.date.__str__" title="Permalink to this definition">¶</a></dt>
<dd><p>For a date <em>d</em>, <tt class="docutils literal"><span class="pre">str(d)</span></tt> is equivalent to <tt class="docutils literal"><span class="pre">d.isoformat()</span></tt>.</p>
</dd></dl>

<dl class="method">
<dt id="datetime.date.ctime">
<tt class="descclassname">date.</tt><tt class="descname">ctime</tt><big>(</big><big>)</big><a class="headerlink" href="#datetime.date.ctime" title="Permalink to this definition">¶</a></dt>
<dd><p>Return a string representing the date, for example <tt class="docutils literal"><span class="pre">date(2002,</span> <span class="pre">12,</span>
<span class="pre">4).ctime()</span> <span class="pre">==</span> <span class="pre">'Wed</span> <span class="pre">Dec</span> <span class="pre">4</span> <span class="pre">00:00:00</span> <span class="pre">2002'</span></tt>. <tt class="docutils literal"><span class="pre">d.ctime()</span></tt> is equivalent to
<tt class="docutils literal"><span class="pre">time.ctime(time.mktime(d.timetuple()))</span></tt> on platforms where the native C
<tt class="xref c c-func docutils literal"><span class="pre">ctime()</span></tt> function (which <a class="reference internal" href="time.html#time.ctime" title="time.ctime"><tt class="xref py py-func docutils literal"><span class="pre">time.ctime()</span></tt></a> invokes, but which
<a class="reference internal" href="#datetime.date.ctime" title="datetime.date.ctime"><tt class="xref py py-meth docutils literal"><span class="pre">date.ctime()</span></tt></a> does not invoke) conforms to the C standard.</p>
</dd></dl>

<dl class="method">
<dt id="datetime.date.strftime">
<tt class="descclassname">date.</tt><tt class="descname">strftime</tt><big>(</big><em>format</em><big>)</big><a class="headerlink" href="#datetime.date.strftime" title="Permalink to this definition">¶</a></dt>
<dd><p>Return a string representing the date, controlled by an explicit format string.
Format codes referring to hours, minutes or seconds will see 0 values. See
section <a class="reference internal" href="#strftime-strptime-behavior"><em>strftime() and strptime() Behavior</em></a>.</p>
</dd></dl>

<dl class="method">
<dt id="datetime.date.__format__">
<tt class="descclassname">date.</tt><tt class="descname">__format__</tt><big>(</big><em>format</em><big>)</big><a class="headerlink" href="#datetime.date.__format__" title="Permalink to this definition">¶</a></dt>
<dd><p>Same as <a class="reference internal" href="#datetime.date.strftime" title="datetime.date.strftime"><tt class="xref py py-meth docutils literal"><span class="pre">date.strftime()</span></tt></a>. This makes it possible to specify format
string for a <a class="reference internal" href="#datetime.date" title="datetime.date"><tt class="xref py py-class docutils literal"><span class="pre">date</span></tt></a> object when using <a class="reference internal" href="stdtypes.html#str.format" title="str.format"><tt class="xref py py-meth docutils literal"><span class="pre">str.format()</span></tt></a>.
See section <a class="reference internal" href="#strftime-strptime-behavior"><em>strftime() and strptime() Behavior</em></a>.</p>
</dd></dl>

<p>Example of counting days to an event:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="kn">import</span> <span class="nn">time</span>
<span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">datetime</span> <span class="kn">import</span> <span class="n">date</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">today</span> <span class="o">=</span> <span class="n">date</span><span class="o">.</span><span class="n">today</span><span class="p">()</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">today</span>
<span class="go">datetime.date(2007, 12, 5)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">today</span> <span class="o">==</span> <span class="n">date</span><span class="o">.</span><span class="n">fromtimestamp</span><span class="p">(</span><span class="n">time</span><span class="o">.</span><span class="n">time</span><span class="p">())</span>
<span class="go">True</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">my_birthday</span> <span class="o">=</span> <span class="n">date</span><span class="p">(</span><span class="n">today</span><span class="o">.</span><span class="n">year</span><span class="p">,</span> <span class="mi">6</span><span class="p">,</span> <span class="mi">24</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="k">if</span> <span class="n">my_birthday</span> <span class="o">&lt;</span> <span class="n">today</span><span class="p">:</span>
<span class="gp">... </span>    <span class="n">my_birthday</span> <span class="o">=</span> <span class="n">my_birthday</span><span class="o">.</span><span class="n">replace</span><span class="p">(</span><span class="n">year</span><span class="o">=</span><span class="n">today</span><span class="o">.</span><span class="n">year</span> <span class="o">+</span> <span class="mi">1</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">my_birthday</span>
<span class="go">datetime.date(2008, 6, 24)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">time_to_birthday</span> <span class="o">=</span> <span class="nb">abs</span><span class="p">(</span><span class="n">my_birthday</span> <span class="o">-</span> <span class="n">today</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">time_to_birthday</span><span class="o">.</span><span class="n">days</span>
<span class="go">202</span>
</pre></div>
</div>
<p>Example of working with <a class="reference internal" href="#datetime.date" title="datetime.date"><tt class="xref py py-class docutils literal"><span class="pre">date</span></tt></a>:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">datetime</span> <span class="kn">import</span> <span class="n">date</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">d</span> <span class="o">=</span> <span class="n">date</span><span class="o">.</span><span class="n">fromordinal</span><span class="p">(</span><span class="mi">730920</span><span class="p">)</span> <span class="c"># 730920th day after 1. 1. 0001</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">d</span>
<span class="go">datetime.date(2002, 3, 11)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">t</span> <span class="o">=</span> <span class="n">d</span><span class="o">.</span><span class="n">timetuple</span><span class="p">()</span>
<span class="gp">&gt;&gt;&gt; </span><span class="k">for</span> <span class="n">i</span> <span class="ow">in</span> <span class="n">t</span><span class="p">:</span>     
<span class="gp">... </span>    <span class="k">print</span> <span class="n">i</span>
<span class="go">2002                # year</span>
<span class="go">3                   # month</span>
<span class="go">11                  # day</span>
<span class="go">0</span>
<span class="go">0</span>
<span class="go">0</span>
<span class="go">0                   # weekday (0 = Monday)</span>
<span class="go">70                  # 70th day in the year</span>
<span class="go">-1</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">ic</span> <span class="o">=</span> <span class="n">d</span><span class="o">.</span><span class="n">isocalendar</span><span class="p">()</span>
<span class="gp">&gt;&gt;&gt; </span><span class="k">for</span> <span class="n">i</span> <span class="ow">in</span> <span class="n">ic</span><span class="p">:</span>    
<span class="gp">... </span>    <span class="k">print</span> <span class="n">i</span>
<span class="go">2002                # ISO year</span>
<span class="go">11                  # ISO week number</span>
<span class="go">1                   # ISO day number ( 1 = Monday )</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">d</span><span class="o">.</span><span class="n">isoformat</span><span class="p">()</span>
<span class="go">&#39;2002-03-11&#39;</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">d</span><span class="o">.</span><span class="n">strftime</span><span class="p">(</span><span class="s">&quot;</span><span class="si">%d</span><span class="s">/%m/%y&quot;</span><span class="p">)</span>
<span class="go">&#39;11/03/02&#39;</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">d</span><span class="o">.</span><span class="n">strftime</span><span class="p">(</span><span class="s">&quot;%A </span><span class="si">%d</span><span class="s">. %B %Y&quot;</span><span class="p">)</span>
<span class="go">&#39;Monday 11. March 2002&#39;</span>
<span class="gp">&gt;&gt;&gt; </span><span class="s">&#39;The {1} is {0:</span><span class="si">%d</span><span class="s">}, the {2} is {0:%B}.&#39;</span><span class="o">.</span><span class="n">format</span><span class="p">(</span><span class="n">d</span><span class="p">,</span> <span class="s">&quot;day&quot;</span><span class="p">,</span> <span class="s">&quot;month&quot;</span><span class="p">)</span>
<span class="go">&#39;The day is 11, the month is March.&#39;</span>
</pre></div>
</div>
</div>
<div class="section" id="datetime-objects">
<span id="datetime-datetime"></span><h2>8.1.4. <a class="reference internal" href="#module-datetime" title="datetime: Basic date and time types."><tt class="xref py py-class docutils literal"><span class="pre">datetime</span></tt></a> Objects<a class="headerlink" href="#datetime-objects" title="Permalink to this headline">¶</a></h2>
<p>A <a class="reference internal" href="#datetime.datetime" title="datetime.datetime"><tt class="xref py py-class docutils literal"><span class="pre">datetime</span></tt></a> object is a single object containing all the information
from a <a class="reference internal" href="#datetime.date" title="datetime.date"><tt class="xref py py-class docutils literal"><span class="pre">date</span></tt></a> object and a <a class="reference internal" href="#datetime.time" title="datetime.time"><tt class="xref py py-class docutils literal"><span class="pre">time</span></tt></a> object.  Like a <a class="reference internal" href="#datetime.date" title="datetime.date"><tt class="xref py py-class docutils literal"><span class="pre">date</span></tt></a>
object, <a class="reference internal" href="#datetime.datetime" title="datetime.datetime"><tt class="xref py py-class docutils literal"><span class="pre">datetime</span></tt></a> assumes the current Gregorian calendar extended in
both directions; like a time object, <a class="reference internal" href="#datetime.datetime" title="datetime.datetime"><tt class="xref py py-class docutils literal"><span class="pre">datetime</span></tt></a> assumes there are exactly
3600*24 seconds in every day.</p>
<p>Constructor:</p>
<dl class="class">
<dt id="datetime.datetime">
<em class="property">class </em><tt class="descclassname">datetime.</tt><tt class="descname">datetime</tt><big>(</big><em>year</em>, <em>month</em>, <em>day</em><span class="optional">[</span>, <em>hour</em><span class="optional">[</span>, <em>minute</em><span class="optional">[</span>, <em>second</em><span class="optional">[</span>, <em>microsecond</em><span class="optional">[</span>, <em>tzinfo</em><span class="optional">]</span><span class="optional">]</span><span class="optional">]</span><span class="optional">]</span><span class="optional">]</span><big>)</big><a class="headerlink" href="#datetime.datetime" title="Permalink to this definition">¶</a></dt>
<dd><p>The year, month and day arguments are required.  <em>tzinfo</em> may be <tt class="docutils literal"><span class="pre">None</span></tt>, or an
instance of a <a class="reference internal" href="#datetime.tzinfo" title="datetime.tzinfo"><tt class="xref py py-class docutils literal"><span class="pre">tzinfo</span></tt></a> subclass.  The remaining arguments may be ints or
longs, in the following ranges:</p>
<ul class="simple">
<li><tt class="docutils literal"><span class="pre">MINYEAR</span> <span class="pre">&lt;=</span> <span class="pre">year</span> <span class="pre">&lt;=</span> <span class="pre">MAXYEAR</span></tt></li>
<li><tt class="docutils literal"><span class="pre">1</span> <span class="pre">&lt;=</span> <span class="pre">month</span> <span class="pre">&lt;=</span> <span class="pre">12</span></tt></li>
<li><tt class="docutils literal"><span class="pre">1</span> <span class="pre">&lt;=</span> <span class="pre">day</span> <span class="pre">&lt;=</span> <span class="pre">number</span> <span class="pre">of</span> <span class="pre">days</span> <span class="pre">in</span> <span class="pre">the</span> <span class="pre">given</span> <span class="pre">month</span> <span class="pre">and</span> <span class="pre">year</span></tt></li>
<li><tt class="docutils literal"><span class="pre">0</span> <span class="pre">&lt;=</span> <span class="pre">hour</span> <span class="pre">&lt;</span> <span class="pre">24</span></tt></li>
<li><tt class="docutils literal"><span class="pre">0</span> <span class="pre">&lt;=</span> <span class="pre">minute</span> <span class="pre">&lt;</span> <span class="pre">60</span></tt></li>
<li><tt class="docutils literal"><span class="pre">0</span> <span class="pre">&lt;=</span> <span class="pre">second</span> <span class="pre">&lt;</span> <span class="pre">60</span></tt></li>
<li><tt class="docutils literal"><span class="pre">0</span> <span class="pre">&lt;=</span> <span class="pre">microsecond</span> <span class="pre">&lt;</span> <span class="pre">1000000</span></tt></li>
</ul>
<p>If an argument outside those ranges is given, <a class="reference internal" href="exceptions.html#exceptions.ValueError" title="exceptions.ValueError"><tt class="xref py py-exc docutils literal"><span class="pre">ValueError</span></tt></a> is raised.</p>
</dd></dl>

<p>Other constructors, all class methods:</p>
<dl class="classmethod">
<dt id="datetime.datetime.today">
<em class="property">classmethod </em><tt class="descclassname">datetime.</tt><tt class="descname">today</tt><big>(</big><big>)</big><a class="headerlink" href="#datetime.datetime.today" title="Permalink to this definition">¶</a></dt>
<dd><p>Return the current local datetime, with <a class="reference internal" href="#datetime.tzinfo" title="datetime.tzinfo"><tt class="xref py py-attr docutils literal"><span class="pre">tzinfo</span></tt></a> <tt class="docutils literal"><span class="pre">None</span></tt>. This is
equivalent to <tt class="docutils literal"><span class="pre">datetime.fromtimestamp(time.time())</span></tt>. See also <a class="reference internal" href="#datetime.datetime.now" title="datetime.datetime.now"><tt class="xref py py-meth docutils literal"><span class="pre">now()</span></tt></a>,
<a class="reference internal" href="#datetime.datetime.fromtimestamp" title="datetime.datetime.fromtimestamp"><tt class="xref py py-meth docutils literal"><span class="pre">fromtimestamp()</span></tt></a>.</p>
</dd></dl>

<dl class="classmethod">
<dt id="datetime.datetime.now">
<em class="property">classmethod </em><tt class="descclassname">datetime.</tt><tt class="descname">now</tt><big>(</big><span class="optional">[</span><em>tz</em><span class="optional">]</span><big>)</big><a class="headerlink" href="#datetime.datetime.now" title="Permalink to this definition">¶</a></dt>
<dd><p>Return the current local date and time.  If optional argument <em>tz</em> is <tt class="docutils literal"><span class="pre">None</span></tt>
or not specified, this is like <a class="reference internal" href="#datetime.datetime.today" title="datetime.datetime.today"><tt class="xref py py-meth docutils literal"><span class="pre">today()</span></tt></a>, but, if possible, supplies more
precision than can be gotten from going through a <a class="reference internal" href="time.html#time.time" title="time.time"><tt class="xref py py-func docutils literal"><span class="pre">time.time()</span></tt></a> timestamp
(for example, this may be possible on platforms supplying the C
<tt class="xref c c-func docutils literal"><span class="pre">gettimeofday()</span></tt> function).</p>
<p>Else <em>tz</em> must be an instance of a class <a class="reference internal" href="#datetime.tzinfo" title="datetime.tzinfo"><tt class="xref py py-class docutils literal"><span class="pre">tzinfo</span></tt></a> subclass, and the
current date and time are converted to <em>tz</em>&#8216;s time zone.  In this case the
result is equivalent to <tt class="docutils literal"><span class="pre">tz.fromutc(datetime.utcnow().replace(tzinfo=tz))</span></tt>.
See also <a class="reference internal" href="#datetime.datetime.today" title="datetime.datetime.today"><tt class="xref py py-meth docutils literal"><span class="pre">today()</span></tt></a>, <a class="reference internal" href="#datetime.datetime.utcnow" title="datetime.datetime.utcnow"><tt class="xref py py-meth docutils literal"><span class="pre">utcnow()</span></tt></a>.</p>
</dd></dl>

<dl class="classmethod">
<dt id="datetime.datetime.utcnow">
<em class="property">classmethod </em><tt class="descclassname">datetime.</tt><tt class="descname">utcnow</tt><big>(</big><big>)</big><a class="headerlink" href="#datetime.datetime.utcnow" title="Permalink to this definition">¶</a></dt>
<dd><p>Return the current UTC date and time, with <a class="reference internal" href="#datetime.tzinfo" title="datetime.tzinfo"><tt class="xref py py-attr docutils literal"><span class="pre">tzinfo</span></tt></a> <tt class="docutils literal"><span class="pre">None</span></tt>. This is like
<a class="reference internal" href="#datetime.datetime.now" title="datetime.datetime.now"><tt class="xref py py-meth docutils literal"><span class="pre">now()</span></tt></a>, but returns the current UTC date and time, as a naive
<a class="reference internal" href="#datetime.datetime" title="datetime.datetime"><tt class="xref py py-class docutils literal"><span class="pre">datetime</span></tt></a> object. See also <a class="reference internal" href="#datetime.datetime.now" title="datetime.datetime.now"><tt class="xref py py-meth docutils literal"><span class="pre">now()</span></tt></a>.</p>
</dd></dl>

<dl class="classmethod">
<dt id="datetime.datetime.fromtimestamp">
<em class="property">classmethod </em><tt class="descclassname">datetime.</tt><tt class="descname">fromtimestamp</tt><big>(</big><em>timestamp</em><span class="optional">[</span>, <em>tz</em><span class="optional">]</span><big>)</big><a class="headerlink" href="#datetime.datetime.fromtimestamp" title="Permalink to this definition">¶</a></dt>
<dd><p>Return the local date and time corresponding to the POSIX timestamp, such as is
returned by <a class="reference internal" href="time.html#time.time" title="time.time"><tt class="xref py py-func docutils literal"><span class="pre">time.time()</span></tt></a>. If optional argument <em>tz</em> is <tt class="docutils literal"><span class="pre">None</span></tt> or not
specified, the timestamp is converted to the platform&#8217;s local date and time, and
the returned <a class="reference internal" href="#datetime.datetime" title="datetime.datetime"><tt class="xref py py-class docutils literal"><span class="pre">datetime</span></tt></a> object is naive.</p>
<p>Else <em>tz</em> must be an instance of a class <a class="reference internal" href="#datetime.tzinfo" title="datetime.tzinfo"><tt class="xref py py-class docutils literal"><span class="pre">tzinfo</span></tt></a> subclass, and the
timestamp is converted to <em>tz</em>&#8216;s time zone.  In this case the result is
equivalent to
<tt class="docutils literal"><span class="pre">tz.fromutc(datetime.utcfromtimestamp(timestamp).replace(tzinfo=tz))</span></tt>.</p>
<p><a class="reference internal" href="#datetime.datetime.fromtimestamp" title="datetime.datetime.fromtimestamp"><tt class="xref py py-meth docutils literal"><span class="pre">fromtimestamp()</span></tt></a> may raise <a class="reference internal" href="exceptions.html#exceptions.ValueError" title="exceptions.ValueError"><tt class="xref py py-exc docutils literal"><span class="pre">ValueError</span></tt></a>, if the timestamp is out of
the range of values supported by the platform C <tt class="xref c c-func docutils literal"><span class="pre">localtime()</span></tt> or
<tt class="xref c c-func docutils literal"><span class="pre">gmtime()</span></tt> functions.  It&#8217;s common for this to be restricted to years in
1970 through 2038. Note that on non-POSIX systems that include leap seconds in
their notion of a timestamp, leap seconds are ignored by <a class="reference internal" href="#datetime.datetime.fromtimestamp" title="datetime.datetime.fromtimestamp"><tt class="xref py py-meth docutils literal"><span class="pre">fromtimestamp()</span></tt></a>,
and then it&#8217;s possible to have two timestamps differing by a second that yield
identical <a class="reference internal" href="#datetime.datetime" title="datetime.datetime"><tt class="xref py py-class docutils literal"><span class="pre">datetime</span></tt></a> objects. See also <a class="reference internal" href="#datetime.datetime.utcfromtimestamp" title="datetime.datetime.utcfromtimestamp"><tt class="xref py py-meth docutils literal"><span class="pre">utcfromtimestamp()</span></tt></a>.</p>
</dd></dl>

<dl class="classmethod">
<dt id="datetime.datetime.utcfromtimestamp">
<em class="property">classmethod </em><tt class="descclassname">datetime.</tt><tt class="descname">utcfromtimestamp</tt><big>(</big><em>timestamp</em><big>)</big><a class="headerlink" href="#datetime.datetime.utcfromtimestamp" title="Permalink to this definition">¶</a></dt>
<dd><p>Return the UTC <a class="reference internal" href="#datetime.datetime" title="datetime.datetime"><tt class="xref py py-class docutils literal"><span class="pre">datetime</span></tt></a> corresponding to the POSIX timestamp, with
<a class="reference internal" href="#datetime.tzinfo" title="datetime.tzinfo"><tt class="xref py py-attr docutils literal"><span class="pre">tzinfo</span></tt></a> <tt class="docutils literal"><span class="pre">None</span></tt>. This may raise <a class="reference internal" href="exceptions.html#exceptions.ValueError" title="exceptions.ValueError"><tt class="xref py py-exc docutils literal"><span class="pre">ValueError</span></tt></a>, if the timestamp is
out of the range of values supported by the platform C <tt class="xref c c-func docutils literal"><span class="pre">gmtime()</span></tt> function.
It&#8217;s common for this to be restricted to years in 1970 through 2038. See also
<a class="reference internal" href="#datetime.datetime.fromtimestamp" title="datetime.datetime.fromtimestamp"><tt class="xref py py-meth docutils literal"><span class="pre">fromtimestamp()</span></tt></a>.</p>
</dd></dl>

<dl class="classmethod">
<dt id="datetime.datetime.fromordinal">
<em class="property">classmethod </em><tt class="descclassname">datetime.</tt><tt class="descname">fromordinal</tt><big>(</big><em>ordinal</em><big>)</big><a class="headerlink" href="#datetime.datetime.fromordinal" title="Permalink to this definition">¶</a></dt>
<dd><p>Return the <a class="reference internal" href="#datetime.datetime" title="datetime.datetime"><tt class="xref py py-class docutils literal"><span class="pre">datetime</span></tt></a> corresponding to the proleptic Gregorian ordinal,
where January 1 of year 1 has ordinal 1. <a class="reference internal" href="exceptions.html#exceptions.ValueError" title="exceptions.ValueError"><tt class="xref py py-exc docutils literal"><span class="pre">ValueError</span></tt></a> is raised unless <tt class="docutils literal"><span class="pre">1</span>
<span class="pre">&lt;=</span> <span class="pre">ordinal</span> <span class="pre">&lt;=</span> <span class="pre">datetime.max.toordinal()</span></tt>.  The hour, minute, second and
microsecond of the result are all 0, and <a class="reference internal" href="#datetime.tzinfo" title="datetime.tzinfo"><tt class="xref py py-attr docutils literal"><span class="pre">tzinfo</span></tt></a> is <tt class="docutils literal"><span class="pre">None</span></tt>.</p>
</dd></dl>

<dl class="classmethod">
<dt id="datetime.datetime.combine">
<em class="property">classmethod </em><tt class="descclassname">datetime.</tt><tt class="descname">combine</tt><big>(</big><em>date</em>, <em>time</em><big>)</big><a class="headerlink" href="#datetime.datetime.combine" title="Permalink to this definition">¶</a></dt>
<dd><p>Return a new <a class="reference internal" href="#datetime.datetime" title="datetime.datetime"><tt class="xref py py-class docutils literal"><span class="pre">datetime</span></tt></a> object whose date components are equal to the
given <a class="reference internal" href="#datetime.date" title="datetime.date"><tt class="xref py py-class docutils literal"><span class="pre">date</span></tt></a> object&#8217;s, and whose time components and <a class="reference internal" href="#datetime.tzinfo" title="datetime.tzinfo"><tt class="xref py py-attr docutils literal"><span class="pre">tzinfo</span></tt></a>
attributes are equal to the given <a class="reference internal" href="#datetime.time" title="datetime.time"><tt class="xref py py-class docutils literal"><span class="pre">time</span></tt></a> object&#8217;s. For any
<a class="reference internal" href="#datetime.datetime" title="datetime.datetime"><tt class="xref py py-class docutils literal"><span class="pre">datetime</span></tt></a> object <em>d</em>,
<tt class="docutils literal"><span class="pre">d</span> <span class="pre">==</span> <span class="pre">datetime.combine(d.date(),</span> <span class="pre">d.timetz())</span></tt>.  If date is a
<a class="reference internal" href="#datetime.datetime" title="datetime.datetime"><tt class="xref py py-class docutils literal"><span class="pre">datetime</span></tt></a> object, its time components and <a class="reference internal" href="#datetime.tzinfo" title="datetime.tzinfo"><tt class="xref py py-attr docutils literal"><span class="pre">tzinfo</span></tt></a> attributes
are ignored.</p>
</dd></dl>

<dl class="classmethod">
<dt id="datetime.datetime.strptime">
<em class="property">classmethod </em><tt class="descclassname">datetime.</tt><tt class="descname">strptime</tt><big>(</big><em>date_string</em>, <em>format</em><big>)</big><a class="headerlink" href="#datetime.datetime.strptime" title="Permalink to this definition">¶</a></dt>
<dd><p>Return a <a class="reference internal" href="#datetime.datetime" title="datetime.datetime"><tt class="xref py py-class docutils literal"><span class="pre">datetime</span></tt></a> corresponding to <em>date_string</em>, parsed according to
<em>format</em>.  This is equivalent to <tt class="docutils literal"><span class="pre">datetime(*(time.strptime(date_string,</span>
<span class="pre">format)[0:6]))</span></tt>. <a class="reference internal" href="exceptions.html#exceptions.ValueError" title="exceptions.ValueError"><tt class="xref py py-exc docutils literal"><span class="pre">ValueError</span></tt></a> is raised if the date_string and format
can&#8217;t be parsed by <a class="reference internal" href="time.html#time.strptime" title="time.strptime"><tt class="xref py py-func docutils literal"><span class="pre">time.strptime()</span></tt></a> or if it returns a value which isn&#8217;t a
time tuple. See section <a class="reference internal" href="#strftime-strptime-behavior"><em>strftime() and strptime() Behavior</em></a>.</p>
<p class="versionadded">
<span class="versionmodified">New in version 2.5.</span></p>
</dd></dl>

<p>Class attributes:</p>
<dl class="attribute">
<dt id="datetime.datetime.min">
<tt class="descclassname">datetime.</tt><tt class="descname">min</tt><a class="headerlink" href="#datetime.datetime.min" title="Permalink to this definition">¶</a></dt>
<dd><p>The earliest representable <a class="reference internal" href="#datetime.datetime" title="datetime.datetime"><tt class="xref py py-class docutils literal"><span class="pre">datetime</span></tt></a>, <tt class="docutils literal"><span class="pre">datetime(MINYEAR,</span> <span class="pre">1,</span> <span class="pre">1,</span>
<span class="pre">tzinfo=None)</span></tt>.</p>
</dd></dl>

<dl class="attribute">
<dt id="datetime.datetime.max">
<tt class="descclassname">datetime.</tt><tt class="descname">max</tt><a class="headerlink" href="#datetime.datetime.max" title="Permalink to this definition">¶</a></dt>
<dd><p>The latest representable <a class="reference internal" href="#datetime.datetime" title="datetime.datetime"><tt class="xref py py-class docutils literal"><span class="pre">datetime</span></tt></a>, <tt class="docutils literal"><span class="pre">datetime(MAXYEAR,</span> <span class="pre">12,</span> <span class="pre">31,</span> <span class="pre">23,</span> <span class="pre">59,</span>
<span class="pre">59,</span> <span class="pre">999999,</span> <span class="pre">tzinfo=None)</span></tt>.</p>
</dd></dl>

<dl class="attribute">
<dt id="datetime.datetime.resolution">
<tt class="descclassname">datetime.</tt><tt class="descname">resolution</tt><a class="headerlink" href="#datetime.datetime.resolution" title="Permalink to this definition">¶</a></dt>
<dd><p>The smallest possible difference between non-equal <a class="reference internal" href="#datetime.datetime" title="datetime.datetime"><tt class="xref py py-class docutils literal"><span class="pre">datetime</span></tt></a> objects,
<tt class="docutils literal"><span class="pre">timedelta(microseconds=1)</span></tt>.</p>
</dd></dl>

<p>Instance attributes (read-only):</p>
<dl class="attribute">
<dt id="datetime.datetime.year">
<tt class="descclassname">datetime.</tt><tt class="descname">year</tt><a class="headerlink" href="#datetime.datetime.year" title="Permalink to this definition">¶</a></dt>
<dd><p>Between <a class="reference internal" href="#datetime.MINYEAR" title="datetime.MINYEAR"><tt class="xref py py-const docutils literal"><span class="pre">MINYEAR</span></tt></a> and <a class="reference internal" href="#datetime.MAXYEAR" title="datetime.MAXYEAR"><tt class="xref py py-const docutils literal"><span class="pre">MAXYEAR</span></tt></a> inclusive.</p>
</dd></dl>

<dl class="attribute">
<dt id="datetime.datetime.month">
<tt class="descclassname">datetime.</tt><tt class="descname">month</tt><a class="headerlink" href="#datetime.datetime.month" title="Permalink to this definition">¶</a></dt>
<dd><p>Between 1 and 12 inclusive.</p>
</dd></dl>

<dl class="attribute">
<dt id="datetime.datetime.day">
<tt class="descclassname">datetime.</tt><tt class="descname">day</tt><a class="headerlink" href="#datetime.datetime.day" title="Permalink to this definition">¶</a></dt>
<dd><p>Between 1 and the number of days in the given month of the given year.</p>
</dd></dl>

<dl class="attribute">
<dt id="datetime.datetime.hour">
<tt class="descclassname">datetime.</tt><tt class="descname">hour</tt><a class="headerlink" href="#datetime.datetime.hour" title="Permalink to this definition">¶</a></dt>
<dd><p>In <tt class="docutils literal"><span class="pre">range(24)</span></tt>.</p>
</dd></dl>

<dl class="attribute">
<dt id="datetime.datetime.minute">
<tt class="descclassname">datetime.</tt><tt class="descname">minute</tt><a class="headerlink" href="#datetime.datetime.minute" title="Permalink to this definition">¶</a></dt>
<dd><p>In <tt class="docutils literal"><span class="pre">range(60)</span></tt>.</p>
</dd></dl>

<dl class="attribute">
<dt id="datetime.datetime.second">
<tt class="descclassname">datetime.</tt><tt class="descname">second</tt><a class="headerlink" href="#datetime.datetime.second" title="Permalink to this definition">¶</a></dt>
<dd><p>In <tt class="docutils literal"><span class="pre">range(60)</span></tt>.</p>
</dd></dl>

<dl class="attribute">
<dt id="datetime.datetime.microsecond">
<tt class="descclassname">datetime.</tt><tt class="descname">microsecond</tt><a class="headerlink" href="#datetime.datetime.microsecond" title="Permalink to this definition">¶</a></dt>
<dd><p>In <tt class="docutils literal"><span class="pre">range(1000000)</span></tt>.</p>
</dd></dl>

<dl class="attribute">
<dt id="datetime.datetime.tzinfo">
<tt class="descclassname">datetime.</tt><tt class="descname">tzinfo</tt><a class="headerlink" href="#datetime.datetime.tzinfo" title="Permalink to this definition">¶</a></dt>
<dd><p>The object passed as the <em>tzinfo</em> argument to the <a class="reference internal" href="#datetime.datetime" title="datetime.datetime"><tt class="xref py py-class docutils literal"><span class="pre">datetime</span></tt></a> constructor,
or <tt class="docutils literal"><span class="pre">None</span></tt> if none was passed.</p>
</dd></dl>

<p>Supported operations:</p>
<table border="1" class="docutils">
<colgroup>
<col width="55%" />
<col width="45%" />
</colgroup>
<thead valign="bottom">
<tr class="row-odd"><th class="head">Operation</th>
<th class="head">Result</th>
</tr>
</thead>
<tbody valign="top">
<tr class="row-even"><td><tt class="docutils literal"><span class="pre">datetime2</span> <span class="pre">=</span> <span class="pre">datetime1</span> <span class="pre">+</span> <span class="pre">timedelta</span></tt></td>
<td>(1)</td>
</tr>
<tr class="row-odd"><td><tt class="docutils literal"><span class="pre">datetime2</span> <span class="pre">=</span> <span class="pre">datetime1</span> <span class="pre">-</span> <span class="pre">timedelta</span></tt></td>
<td>(2)</td>
</tr>
<tr class="row-even"><td><tt class="docutils literal"><span class="pre">timedelta</span> <span class="pre">=</span> <span class="pre">datetime1</span> <span class="pre">-</span> <span class="pre">datetime2</span></tt></td>
<td>(3)</td>
</tr>
<tr class="row-odd"><td><tt class="docutils literal"><span class="pre">datetime1</span> <span class="pre">&lt;</span> <span class="pre">datetime2</span></tt></td>
<td>Compares <a class="reference internal" href="#datetime.datetime" title="datetime.datetime"><tt class="xref py py-class docutils literal"><span class="pre">datetime</span></tt></a> to
<a class="reference internal" href="#datetime.datetime" title="datetime.datetime"><tt class="xref py py-class docutils literal"><span class="pre">datetime</span></tt></a>. (4)</td>
</tr>
</tbody>
</table>
<ol class="arabic">
<li><p class="first">datetime2 is a duration of timedelta removed from datetime1, moving forward in
time if <tt class="docutils literal"><span class="pre">timedelta.days</span></tt> &gt; 0, or backward if <tt class="docutils literal"><span class="pre">timedelta.days</span></tt> &lt; 0.  The
result has the same <a class="reference internal" href="#datetime.tzinfo" title="datetime.tzinfo"><tt class="xref py py-attr docutils literal"><span class="pre">tzinfo</span></tt></a> attribute as the input datetime, and
datetime2 - datetime1 == timedelta after. <a class="reference internal" href="exceptions.html#exceptions.OverflowError" title="exceptions.OverflowError"><tt class="xref py py-exc docutils literal"><span class="pre">OverflowError</span></tt></a> is raised if
datetime2.year would be smaller than <a class="reference internal" href="#datetime.MINYEAR" title="datetime.MINYEAR"><tt class="xref py py-const docutils literal"><span class="pre">MINYEAR</span></tt></a> or larger than
<a class="reference internal" href="#datetime.MAXYEAR" title="datetime.MAXYEAR"><tt class="xref py py-const docutils literal"><span class="pre">MAXYEAR</span></tt></a>. Note that no time zone adjustments are done even if the
input is an aware object.</p>
</li>
<li><p class="first">Computes the datetime2 such that datetime2 + timedelta == datetime1. As for
addition, the result has the same <a class="reference internal" href="#datetime.tzinfo" title="datetime.tzinfo"><tt class="xref py py-attr docutils literal"><span class="pre">tzinfo</span></tt></a> attribute as the input
datetime, and no time zone adjustments are done even if the input is aware.
This isn&#8217;t quite equivalent to datetime1 + (-timedelta), because -timedelta
in isolation can overflow in cases where datetime1 - timedelta does not.</p>
</li>
<li><p class="first">Subtraction of a <a class="reference internal" href="#datetime.datetime" title="datetime.datetime"><tt class="xref py py-class docutils literal"><span class="pre">datetime</span></tt></a> from a <a class="reference internal" href="#datetime.datetime" title="datetime.datetime"><tt class="xref py py-class docutils literal"><span class="pre">datetime</span></tt></a> is defined only if
both operands are naive, or if both are aware.  If one is aware and the other is
naive, <a class="reference internal" href="exceptions.html#exceptions.TypeError" title="exceptions.TypeError"><tt class="xref py py-exc docutils literal"><span class="pre">TypeError</span></tt></a> is raised.</p>
<p>If both are naive, or both are aware and have the same <a class="reference internal" href="#datetime.tzinfo" title="datetime.tzinfo"><tt class="xref py py-attr docutils literal"><span class="pre">tzinfo</span></tt></a> attribute,
the <a class="reference internal" href="#datetime.tzinfo" title="datetime.tzinfo"><tt class="xref py py-attr docutils literal"><span class="pre">tzinfo</span></tt></a> attributes are ignored, and the result is a <a class="reference internal" href="#datetime.timedelta" title="datetime.timedelta"><tt class="xref py py-class docutils literal"><span class="pre">timedelta</span></tt></a>
object <em>t</em> such that <tt class="docutils literal"><span class="pre">datetime2</span> <span class="pre">+</span> <span class="pre">t</span> <span class="pre">==</span> <span class="pre">datetime1</span></tt>.  No time zone adjustments
are done in this case.</p>
<p>If both are aware and have different <a class="reference internal" href="#datetime.tzinfo" title="datetime.tzinfo"><tt class="xref py py-attr docutils literal"><span class="pre">tzinfo</span></tt></a> attributes, <tt class="docutils literal"><span class="pre">a-b</span></tt> acts
as if <em>a</em> and <em>b</em> were first converted to naive UTC datetimes first.  The
result is <tt class="docutils literal"><span class="pre">(a.replace(tzinfo=None)</span> <span class="pre">-</span> <span class="pre">a.utcoffset())</span> <span class="pre">-</span> <span class="pre">(b.replace(tzinfo=None)</span>
<span class="pre">-</span> <span class="pre">b.utcoffset())</span></tt> except that the implementation never overflows.</p>
</li>
<li><p class="first"><em>datetime1</em> is considered less than <em>datetime2</em> when <em>datetime1</em> precedes
<em>datetime2</em> in time.</p>
<p>If one comparand is naive and the other is aware, <a class="reference internal" href="exceptions.html#exceptions.TypeError" title="exceptions.TypeError"><tt class="xref py py-exc docutils literal"><span class="pre">TypeError</span></tt></a> is raised.
If both comparands are aware, and have the same <a class="reference internal" href="#datetime.tzinfo" title="datetime.tzinfo"><tt class="xref py py-attr docutils literal"><span class="pre">tzinfo</span></tt></a> attribute, the
common <a class="reference internal" href="#datetime.tzinfo" title="datetime.tzinfo"><tt class="xref py py-attr docutils literal"><span class="pre">tzinfo</span></tt></a> attribute is ignored and the base datetimes are
compared.  If both comparands are aware and have different <a class="reference internal" href="#datetime.tzinfo" title="datetime.tzinfo"><tt class="xref py py-attr docutils literal"><span class="pre">tzinfo</span></tt></a>
attributes, the comparands are first adjusted by subtracting their UTC
offsets (obtained from <tt class="docutils literal"><span class="pre">self.utcoffset()</span></tt>).</p>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">In order to stop comparison from falling back to the default scheme of comparing
object addresses, datetime comparison normally raises <a class="reference internal" href="exceptions.html#exceptions.TypeError" title="exceptions.TypeError"><tt class="xref py py-exc docutils literal"><span class="pre">TypeError</span></tt></a> if the
other comparand isn&#8217;t also a <a class="reference internal" href="#datetime.datetime" title="datetime.datetime"><tt class="xref py py-class docutils literal"><span class="pre">datetime</span></tt></a> object.  However,
<tt class="docutils literal"><span class="pre">NotImplemented</span></tt> is returned instead if the other comparand has a
<tt class="xref py py-meth docutils literal"><span class="pre">timetuple()</span></tt> attribute.  This hook gives other kinds of date objects a
chance at implementing mixed-type comparison.  If not, when a <a class="reference internal" href="#datetime.datetime" title="datetime.datetime"><tt class="xref py py-class docutils literal"><span class="pre">datetime</span></tt></a>
object is compared to an object of a different type, <a class="reference internal" href="exceptions.html#exceptions.TypeError" title="exceptions.TypeError"><tt class="xref py py-exc docutils literal"><span class="pre">TypeError</span></tt></a> is raised
unless the comparison is <tt class="docutils literal"><span class="pre">==</span></tt> or <tt class="docutils literal"><span class="pre">!=</span></tt>.  The latter cases return
<a class="reference internal" href="constants.html#False" title="False"><tt class="xref py py-const docutils literal"><span class="pre">False</span></tt></a> or <a class="reference internal" href="constants.html#True" title="True"><tt class="xref py py-const docutils literal"><span class="pre">True</span></tt></a>, respectively.</p>
</div>
</li>
</ol>
<p><a class="reference internal" href="#datetime.datetime" title="datetime.datetime"><tt class="xref py py-class docutils literal"><span class="pre">datetime</span></tt></a> objects can be used as dictionary keys. In Boolean contexts,
all <a class="reference internal" href="#datetime.datetime" title="datetime.datetime"><tt class="xref py py-class docutils literal"><span class="pre">datetime</span></tt></a> objects are considered to be true.</p>
<p>Instance methods:</p>
<dl class="method">
<dt id="datetime.datetime.date">
<tt class="descclassname">datetime.</tt><tt class="descname">date</tt><big>(</big><big>)</big><a class="headerlink" href="#datetime.datetime.date" title="Permalink to this definition">¶</a></dt>
<dd><p>Return <a class="reference internal" href="#datetime.date" title="datetime.date"><tt class="xref py py-class docutils literal"><span class="pre">date</span></tt></a> object with same year, month and day.</p>
</dd></dl>

<dl class="method">
<dt id="datetime.datetime.time">
<tt class="descclassname">datetime.</tt><tt class="descname">time</tt><big>(</big><big>)</big><a class="headerlink" href="#datetime.datetime.time" title="Permalink to this definition">¶</a></dt>
<dd><p>Return <a class="reference internal" href="#datetime.time" title="datetime.time"><tt class="xref py py-class docutils literal"><span class="pre">time</span></tt></a> object with same hour, minute, second and microsecond.
<a class="reference internal" href="#datetime.tzinfo" title="datetime.tzinfo"><tt class="xref py py-attr docutils literal"><span class="pre">tzinfo</span></tt></a> is <tt class="docutils literal"><span class="pre">None</span></tt>.  See also method <a class="reference internal" href="#datetime.datetime.timetz" title="datetime.datetime.timetz"><tt class="xref py py-meth docutils literal"><span class="pre">timetz()</span></tt></a>.</p>
</dd></dl>

<dl class="method">
<dt id="datetime.datetime.timetz">
<tt class="descclassname">datetime.</tt><tt class="descname">timetz</tt><big>(</big><big>)</big><a class="headerlink" href="#datetime.datetime.timetz" title="Permalink to this definition">¶</a></dt>
<dd><p>Return <a class="reference internal" href="#datetime.time" title="datetime.time"><tt class="xref py py-class docutils literal"><span class="pre">time</span></tt></a> object with same hour, minute, second, microsecond, and
tzinfo attributes.  See also method <a class="reference internal" href="time.html#module-time" title="time: Time access and conversions."><tt class="xref py py-meth docutils literal"><span class="pre">time()</span></tt></a>.</p>
</dd></dl>

<dl class="method">
<dt id="datetime.datetime.replace">
<tt class="descclassname">datetime.</tt><tt class="descname">replace</tt><big>(</big><span class="optional">[</span><em>year</em><span class="optional">[</span>, <em>month</em><span class="optional">[</span>, <em>day</em><span class="optional">[</span>, <em>hour</em><span class="optional">[</span>, <em>minute</em><span class="optional">[</span>, <em>second</em><span class="optional">[</span>, <em>microsecond</em><span class="optional">[</span>, <em>tzinfo</em><span class="optional">]</span><span class="optional">]</span><span class="optional">]</span><span class="optional">]</span><span class="optional">]</span><span class="optional">]</span><span class="optional">]</span><span class="optional">]</span><big>)</big><a class="headerlink" href="#datetime.datetime.replace" title="Permalink to this definition">¶</a></dt>
<dd><p>Return a datetime with the same attributes, except for those attributes given
new values by whichever keyword arguments are specified.  Note that
<tt class="docutils literal"><span class="pre">tzinfo=None</span></tt> can be specified to create a naive datetime from an aware
datetime with no conversion of date and time data.</p>
</dd></dl>

<dl class="method">
<dt id="datetime.datetime.astimezone">
<tt class="descclassname">datetime.</tt><tt class="descname">astimezone</tt><big>(</big><em>tz</em><big>)</big><a class="headerlink" href="#datetime.datetime.astimezone" title="Permalink to this definition">¶</a></dt>
<dd><p>Return a <a class="reference internal" href="#datetime.datetime" title="datetime.datetime"><tt class="xref py py-class docutils literal"><span class="pre">datetime</span></tt></a> object with new <a class="reference internal" href="#datetime.tzinfo" title="datetime.tzinfo"><tt class="xref py py-attr docutils literal"><span class="pre">tzinfo</span></tt></a> attribute <em>tz</em>,
adjusting the date and time data so the result is the same UTC time as
<em>self</em>, but in <em>tz</em>&#8216;s local time.</p>
<p><em>tz</em> must be an instance of a <a class="reference internal" href="#datetime.tzinfo" title="datetime.tzinfo"><tt class="xref py py-class docutils literal"><span class="pre">tzinfo</span></tt></a> subclass, and its
<a class="reference internal" href="#datetime.datetime.utcoffset" title="datetime.datetime.utcoffset"><tt class="xref py py-meth docutils literal"><span class="pre">utcoffset()</span></tt></a> and <a class="reference internal" href="#datetime.datetime.dst" title="datetime.datetime.dst"><tt class="xref py py-meth docutils literal"><span class="pre">dst()</span></tt></a> methods must not return <tt class="docutils literal"><span class="pre">None</span></tt>.  <em>self</em> must
be aware (<tt class="docutils literal"><span class="pre">self.tzinfo</span></tt> must not be <tt class="docutils literal"><span class="pre">None</span></tt>, and <tt class="docutils literal"><span class="pre">self.utcoffset()</span></tt> must
not return <tt class="docutils literal"><span class="pre">None</span></tt>).</p>
<p>If <tt class="docutils literal"><span class="pre">self.tzinfo</span></tt> is <em>tz</em>, <tt class="docutils literal"><span class="pre">self.astimezone(tz)</span></tt> is equal to <em>self</em>:  no
adjustment of date or time data is performed. Else the result is local
time in time zone <em>tz</em>, representing the same UTC time as <em>self</em>:  after
<tt class="docutils literal"><span class="pre">astz</span> <span class="pre">=</span> <span class="pre">dt.astimezone(tz)</span></tt>, <tt class="docutils literal"><span class="pre">astz</span> <span class="pre">-</span> <span class="pre">astz.utcoffset()</span></tt> will usually have
the same date and time data as <tt class="docutils literal"><span class="pre">dt</span> <span class="pre">-</span> <span class="pre">dt.utcoffset()</span></tt>. The discussion
of class <a class="reference internal" href="#datetime.tzinfo" title="datetime.tzinfo"><tt class="xref py py-class docutils literal"><span class="pre">tzinfo</span></tt></a> explains the cases at Daylight Saving Time transition
boundaries where this cannot be achieved (an issue only if <em>tz</em> models both
standard and daylight time).</p>
<p>If you merely want to attach a time zone object <em>tz</em> to a datetime <em>dt</em> without
adjustment of date and time data, use <tt class="docutils literal"><span class="pre">dt.replace(tzinfo=tz)</span></tt>.  If you
merely want to remove the time zone object from an aware datetime <em>dt</em> without
conversion of date and time data, use <tt class="docutils literal"><span class="pre">dt.replace(tzinfo=None)</span></tt>.</p>
<p>Note that the default <a class="reference internal" href="#datetime.tzinfo.fromutc" title="datetime.tzinfo.fromutc"><tt class="xref py py-meth docutils literal"><span class="pre">tzinfo.fromutc()</span></tt></a> method can be overridden in a
<a class="reference internal" href="#datetime.tzinfo" title="datetime.tzinfo"><tt class="xref py py-class docutils literal"><span class="pre">tzinfo</span></tt></a> subclass to affect the result returned by <a class="reference internal" href="#datetime.datetime.astimezone" title="datetime.datetime.astimezone"><tt class="xref py py-meth docutils literal"><span class="pre">astimezone()</span></tt></a>.
Ignoring error cases, <a class="reference internal" href="#datetime.datetime.astimezone" title="datetime.datetime.astimezone"><tt class="xref py py-meth docutils literal"><span class="pre">astimezone()</span></tt></a> acts like:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="k">def</span> <span class="nf">astimezone</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">tz</span><span class="p">):</span>
    <span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">tzinfo</span> <span class="ow">is</span> <span class="n">tz</span><span class="p">:</span>
        <span class="k">return</span> <span class="bp">self</span>
    <span class="c"># Convert self to UTC, and attach the new time zone object.</span>
    <span class="n">utc</span> <span class="o">=</span> <span class="p">(</span><span class="bp">self</span> <span class="o">-</span> <span class="bp">self</span><span class="o">.</span><span class="n">utcoffset</span><span class="p">())</span><span class="o">.</span><span class="n">replace</span><span class="p">(</span><span class="n">tzinfo</span><span class="o">=</span><span class="n">tz</span><span class="p">)</span>
    <span class="c"># Convert from UTC to tz&#39;s local time.</span>
    <span class="k">return</span> <span class="n">tz</span><span class="o">.</span><span class="n">fromutc</span><span class="p">(</span><span class="n">utc</span><span class="p">)</span>
</pre></div>
</div>
</dd></dl>

<dl class="method">
<dt id="datetime.datetime.utcoffset">
<tt class="descclassname">datetime.</tt><tt class="descname">utcoffset</tt><big>(</big><big>)</big><a class="headerlink" href="#datetime.datetime.utcoffset" title="Permalink to this definition">¶</a></dt>
<dd><p>If <a class="reference internal" href="#datetime.tzinfo" title="datetime.tzinfo"><tt class="xref py py-attr docutils literal"><span class="pre">tzinfo</span></tt></a> is <tt class="docutils literal"><span class="pre">None</span></tt>, returns <tt class="docutils literal"><span class="pre">None</span></tt>, else returns
<tt class="docutils literal"><span class="pre">self.tzinfo.utcoffset(self)</span></tt>, and raises an exception if the latter doesn&#8217;t
return <tt class="docutils literal"><span class="pre">None</span></tt>, or a <a class="reference internal" href="#datetime.timedelta" title="datetime.timedelta"><tt class="xref py py-class docutils literal"><span class="pre">timedelta</span></tt></a> object representing a whole number of
minutes with magnitude less than one day.</p>
</dd></dl>

<dl class="method">
<dt id="datetime.datetime.dst">
<tt class="descclassname">datetime.</tt><tt class="descname">dst</tt><big>(</big><big>)</big><a class="headerlink" href="#datetime.datetime.dst" title="Permalink to this definition">¶</a></dt>
<dd><p>If <a class="reference internal" href="#datetime.tzinfo" title="datetime.tzinfo"><tt class="xref py py-attr docutils literal"><span class="pre">tzinfo</span></tt></a> is <tt class="docutils literal"><span class="pre">None</span></tt>, returns <tt class="docutils literal"><span class="pre">None</span></tt>, else returns
<tt class="docutils literal"><span class="pre">self.tzinfo.dst(self)</span></tt>, and raises an exception if the latter doesn&#8217;t return
<tt class="docutils literal"><span class="pre">None</span></tt>, or a <a class="reference internal" href="#datetime.timedelta" title="datetime.timedelta"><tt class="xref py py-class docutils literal"><span class="pre">timedelta</span></tt></a> object representing a whole number of minutes
with magnitude less than one day.</p>
</dd></dl>

<dl class="method">
<dt id="datetime.datetime.tzname">
<tt class="descclassname">datetime.</tt><tt class="descname">tzname</tt><big>(</big><big>)</big><a class="headerlink" href="#datetime.datetime.tzname" title="Permalink to this definition">¶</a></dt>
<dd><p>If <a class="reference internal" href="#datetime.tzinfo" title="datetime.tzinfo"><tt class="xref py py-attr docutils literal"><span class="pre">tzinfo</span></tt></a> is <tt class="docutils literal"><span class="pre">None</span></tt>, returns <tt class="docutils literal"><span class="pre">None</span></tt>, else returns
<tt class="docutils literal"><span class="pre">self.tzinfo.tzname(self)</span></tt>, raises an exception if the latter doesn&#8217;t return
<tt class="docutils literal"><span class="pre">None</span></tt> or a string object,</p>
</dd></dl>

<dl class="method">
<dt id="datetime.datetime.timetuple">
<tt class="descclassname">datetime.</tt><tt class="descname">timetuple</tt><big>(</big><big>)</big><a class="headerlink" href="#datetime.datetime.timetuple" title="Permalink to this definition">¶</a></dt>
<dd><p>Return a <a class="reference internal" href="time.html#time.struct_time" title="time.struct_time"><tt class="xref py py-class docutils literal"><span class="pre">time.struct_time</span></tt></a> such as returned by <a class="reference internal" href="time.html#time.localtime" title="time.localtime"><tt class="xref py py-func docutils literal"><span class="pre">time.localtime()</span></tt></a>.
<tt class="docutils literal"><span class="pre">d.timetuple()</span></tt> is equivalent to <tt class="docutils literal"><span class="pre">time.struct_time((d.year,</span> <span class="pre">d.month,</span> <span class="pre">d.day,</span>
<span class="pre">d.hour,</span> <span class="pre">d.minute,</span> <span class="pre">d.second,</span> <span class="pre">d.weekday(),</span> <span class="pre">yday,</span> <span class="pre">dst))</span></tt>, where <tt class="docutils literal"><span class="pre">yday</span> <span class="pre">=</span>
<span class="pre">d.toordinal()</span> <span class="pre">-</span> <span class="pre">date(d.year,</span> <span class="pre">1,</span> <span class="pre">1).toordinal()</span> <span class="pre">+</span> <span class="pre">1</span></tt> is the day number within
the current year starting with <tt class="docutils literal"><span class="pre">1</span></tt> for January 1st. The <tt class="xref py py-attr docutils literal"><span class="pre">tm_isdst</span></tt> flag
of the result is set according to the <a class="reference internal" href="#datetime.datetime.dst" title="datetime.datetime.dst"><tt class="xref py py-meth docutils literal"><span class="pre">dst()</span></tt></a> method: <a class="reference internal" href="#datetime.tzinfo" title="datetime.tzinfo"><tt class="xref py py-attr docutils literal"><span class="pre">tzinfo</span></tt></a> is
<tt class="docutils literal"><span class="pre">None</span></tt> or <a class="reference internal" href="#datetime.datetime.dst" title="datetime.datetime.dst"><tt class="xref py py-meth docutils literal"><span class="pre">dst()</span></tt></a> returns <tt class="docutils literal"><span class="pre">None</span></tt>, <tt class="xref py py-attr docutils literal"><span class="pre">tm_isdst</span></tt> is set to <tt class="docutils literal"><span class="pre">-1</span></tt>;
else if <a class="reference internal" href="#datetime.datetime.dst" title="datetime.datetime.dst"><tt class="xref py py-meth docutils literal"><span class="pre">dst()</span></tt></a> returns a non-zero value, <tt class="xref py py-attr docutils literal"><span class="pre">tm_isdst</span></tt> is set to <tt class="docutils literal"><span class="pre">1</span></tt>;
else <tt class="xref py py-attr docutils literal"><span class="pre">tm_isdst</span></tt> is set to <tt class="docutils literal"><span class="pre">0</span></tt>.</p>
</dd></dl>

<dl class="method">
<dt id="datetime.datetime.utctimetuple">
<tt class="descclassname">datetime.</tt><tt class="descname">utctimetuple</tt><big>(</big><big>)</big><a class="headerlink" href="#datetime.datetime.utctimetuple" title="Permalink to this definition">¶</a></dt>
<dd><p>If <a class="reference internal" href="#datetime.datetime" title="datetime.datetime"><tt class="xref py py-class docutils literal"><span class="pre">datetime</span></tt></a> instance <em>d</em> is naive, this is the same as
<tt class="docutils literal"><span class="pre">d.timetuple()</span></tt> except that <tt class="xref py py-attr docutils literal"><span class="pre">tm_isdst</span></tt> is forced to 0 regardless of what
<tt class="docutils literal"><span class="pre">d.dst()</span></tt> returns.  DST is never in effect for a UTC time.</p>
<p>If <em>d</em> is aware, <em>d</em> is normalized to UTC time, by subtracting
<tt class="docutils literal"><span class="pre">d.utcoffset()</span></tt>, and a <a class="reference internal" href="time.html#time.struct_time" title="time.struct_time"><tt class="xref py py-class docutils literal"><span class="pre">time.struct_time</span></tt></a> for the normalized time is
returned.  <tt class="xref py py-attr docutils literal"><span class="pre">tm_isdst</span></tt> is forced to 0. Note that the result&#8217;s
<tt class="xref py py-attr docutils literal"><span class="pre">tm_year</span></tt> member may be <a class="reference internal" href="#datetime.MINYEAR" title="datetime.MINYEAR"><tt class="xref py py-const docutils literal"><span class="pre">MINYEAR</span></tt></a>-1 or <a class="reference internal" href="#datetime.MAXYEAR" title="datetime.MAXYEAR"><tt class="xref py py-const docutils literal"><span class="pre">MAXYEAR</span></tt></a>+1, if
<em>d</em>.year was <tt class="docutils literal"><span class="pre">MINYEAR</span></tt> or <tt class="docutils literal"><span class="pre">MAXYEAR</span></tt> and UTC adjustment spills over a year
boundary.</p>
</dd></dl>

<dl class="method">
<dt id="datetime.datetime.toordinal">
<tt class="descclassname">datetime.</tt><tt class="descname">toordinal</tt><big>(</big><big>)</big><a class="headerlink" href="#datetime.datetime.toordinal" title="Permalink to this definition">¶</a></dt>
<dd><p>Return the proleptic Gregorian ordinal of the date.  The same as
<tt class="docutils literal"><span class="pre">self.date().toordinal()</span></tt>.</p>
</dd></dl>

<dl class="method">
<dt id="datetime.datetime.weekday">
<tt class="descclassname">datetime.</tt><tt class="descname">weekday</tt><big>(</big><big>)</big><a class="headerlink" href="#datetime.datetime.weekday" title="Permalink to this definition">¶</a></dt>
<dd><p>Return the day of the week as an integer, where Monday is 0 and Sunday is 6.
The same as <tt class="docutils literal"><span class="pre">self.date().weekday()</span></tt>. See also <a class="reference internal" href="#datetime.datetime.isoweekday" title="datetime.datetime.isoweekday"><tt class="xref py py-meth docutils literal"><span class="pre">isoweekday()</span></tt></a>.</p>
</dd></dl>

<dl class="method">
<dt id="datetime.datetime.isoweekday">
<tt class="descclassname">datetime.</tt><tt class="descname">isoweekday</tt><big>(</big><big>)</big><a class="headerlink" href="#datetime.datetime.isoweekday" title="Permalink to this definition">¶</a></dt>
<dd><p>Return the day of the week as an integer, where Monday is 1 and Sunday is 7.
The same as <tt class="docutils literal"><span class="pre">self.date().isoweekday()</span></tt>. See also <a class="reference internal" href="#datetime.datetime.weekday" title="datetime.datetime.weekday"><tt class="xref py py-meth docutils literal"><span class="pre">weekday()</span></tt></a>,
<a class="reference internal" href="#datetime.datetime.isocalendar" title="datetime.datetime.isocalendar"><tt class="xref py py-meth docutils literal"><span class="pre">isocalendar()</span></tt></a>.</p>
</dd></dl>

<dl class="method">
<dt id="datetime.datetime.isocalendar">
<tt class="descclassname">datetime.</tt><tt class="descname">isocalendar</tt><big>(</big><big>)</big><a class="headerlink" href="#datetime.datetime.isocalendar" title="Permalink to this definition">¶</a></dt>
<dd><p>Return a 3-tuple, (ISO year, ISO week number, ISO weekday).  The same as
<tt class="docutils literal"><span class="pre">self.date().isocalendar()</span></tt>.</p>
</dd></dl>

<dl class="method">
<dt id="datetime.datetime.isoformat">
<tt class="descclassname">datetime.</tt><tt class="descname">isoformat</tt><big>(</big><span class="optional">[</span><em>sep</em><span class="optional">]</span><big>)</big><a class="headerlink" href="#datetime.datetime.isoformat" title="Permalink to this definition">¶</a></dt>
<dd><p>Return a string representing the date and time in ISO 8601 format,
YYYY-MM-DDTHH:MM:SS.mmmmmm or, if <a class="reference internal" href="#datetime.datetime.microsecond" title="datetime.datetime.microsecond"><tt class="xref py py-attr docutils literal"><span class="pre">microsecond</span></tt></a> is 0,
YYYY-MM-DDTHH:MM:SS</p>
<p>If <a class="reference internal" href="#datetime.datetime.utcoffset" title="datetime.datetime.utcoffset"><tt class="xref py py-meth docutils literal"><span class="pre">utcoffset()</span></tt></a> does not return <tt class="docutils literal"><span class="pre">None</span></tt>, a 6-character string is
appended, giving the UTC offset in (signed) hours and minutes:
YYYY-MM-DDTHH:MM:SS.mmmmmm+HH:MM or, if <a class="reference internal" href="#datetime.datetime.microsecond" title="datetime.datetime.microsecond"><tt class="xref py py-attr docutils literal"><span class="pre">microsecond</span></tt></a> is 0
YYYY-MM-DDTHH:MM:SS+HH:MM</p>
<p>The optional argument <em>sep</em> (default <tt class="docutils literal"><span class="pre">'T'</span></tt>) is a one-character separator,
placed between the date and time portions of the result.  For example,</p>
<div class="highlight-python"><div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">datetime</span> <span class="kn">import</span> <span class="n">tzinfo</span><span class="p">,</span> <span class="n">timedelta</span><span class="p">,</span> <span class="n">datetime</span>
<span class="gp">&gt;&gt;&gt; </span><span class="k">class</span> <span class="nc">TZ</span><span class="p">(</span><span class="n">tzinfo</span><span class="p">):</span>
<span class="gp">... </span>    <span class="k">def</span> <span class="nf">utcoffset</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">dt</span><span class="p">):</span> <span class="k">return</span> <span class="n">timedelta</span><span class="p">(</span><span class="n">minutes</span><span class="o">=-</span><span class="mi">399</span><span class="p">)</span>
<span class="gp">...</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">datetime</span><span class="p">(</span><span class="mi">2002</span><span class="p">,</span> <span class="mi">12</span><span class="p">,</span> <span class="mi">25</span><span class="p">,</span> <span class="n">tzinfo</span><span class="o">=</span><span class="n">TZ</span><span class="p">())</span><span class="o">.</span><span class="n">isoformat</span><span class="p">(</span><span class="s">&#39; &#39;</span><span class="p">)</span>
<span class="go">&#39;2002-12-25 00:00:00-06:39&#39;</span>
</pre></div>
</div>
</dd></dl>

<dl class="method">
<dt id="datetime.datetime.__str__">
<tt class="descclassname">datetime.</tt><tt class="descname">__str__</tt><big>(</big><big>)</big><a class="headerlink" href="#datetime.datetime.__str__" title="Permalink to this definition">¶</a></dt>
<dd><p>For a <a class="reference internal" href="#datetime.datetime" title="datetime.datetime"><tt class="xref py py-class docutils literal"><span class="pre">datetime</span></tt></a> instance <em>d</em>, <tt class="docutils literal"><span class="pre">str(d)</span></tt> is equivalent to
<tt class="docutils literal"><span class="pre">d.isoformat('</span> <span class="pre">')</span></tt>.</p>
</dd></dl>

<dl class="method">
<dt id="datetime.datetime.ctime">
<tt class="descclassname">datetime.</tt><tt class="descname">ctime</tt><big>(</big><big>)</big><a class="headerlink" href="#datetime.datetime.ctime" title="Permalink to this definition">¶</a></dt>
<dd><p>Return a string representing the date and time, for example <tt class="docutils literal"><span class="pre">datetime(2002,</span> <span class="pre">12,</span>
<span class="pre">4,</span> <span class="pre">20,</span> <span class="pre">30,</span> <span class="pre">40).ctime()</span> <span class="pre">==</span> <span class="pre">'Wed</span> <span class="pre">Dec</span>&nbsp; <span class="pre">4</span> <span class="pre">20:30:40</span> <span class="pre">2002'</span></tt>. <tt class="docutils literal"><span class="pre">d.ctime()</span></tt> is
equivalent to <tt class="docutils literal"><span class="pre">time.ctime(time.mktime(d.timetuple()))</span></tt> on platforms where the
native C <tt class="xref c c-func docutils literal"><span class="pre">ctime()</span></tt> function (which <a class="reference internal" href="time.html#time.ctime" title="time.ctime"><tt class="xref py py-func docutils literal"><span class="pre">time.ctime()</span></tt></a> invokes, but which
<a class="reference internal" href="#datetime.datetime.ctime" title="datetime.datetime.ctime"><tt class="xref py py-meth docutils literal"><span class="pre">datetime.ctime()</span></tt></a> does not invoke) conforms to the C standard.</p>
</dd></dl>

<dl class="method">
<dt id="datetime.datetime.strftime">
<tt class="descclassname">datetime.</tt><tt class="descname">strftime</tt><big>(</big><em>format</em><big>)</big><a class="headerlink" href="#datetime.datetime.strftime" title="Permalink to this definition">¶</a></dt>
<dd><p>Return a string representing the date and time, controlled by an explicit format
string.  See section <a class="reference internal" href="#strftime-strptime-behavior"><em>strftime() and strptime() Behavior</em></a>.</p>
</dd></dl>

<dl class="method">
<dt id="datetime.datetime.__format__">
<tt class="descclassname">datetime.</tt><tt class="descname">__format__</tt><big>(</big><em>format</em><big>)</big><a class="headerlink" href="#datetime.datetime.__format__" title="Permalink to this definition">¶</a></dt>
<dd><p>Same as <a class="reference internal" href="#datetime.datetime.strftime" title="datetime.datetime.strftime"><tt class="xref py py-meth docutils literal"><span class="pre">datetime.strftime()</span></tt></a>.  This makes it possible to specify format
string for a <a class="reference internal" href="#datetime.datetime" title="datetime.datetime"><tt class="xref py py-class docutils literal"><span class="pre">datetime</span></tt></a> object when using <a class="reference internal" href="stdtypes.html#str.format" title="str.format"><tt class="xref py py-meth docutils literal"><span class="pre">str.format()</span></tt></a>.
See section <a class="reference internal" href="#strftime-strptime-behavior"><em>strftime() and strptime() Behavior</em></a>.</p>
</dd></dl>

<p>Examples of working with datetime objects:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">datetime</span> <span class="kn">import</span> <span class="n">datetime</span><span class="p">,</span> <span class="n">date</span><span class="p">,</span> <span class="n">time</span>
<span class="gp">&gt;&gt;&gt; </span><span class="c"># Using datetime.combine()</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">d</span> <span class="o">=</span> <span class="n">date</span><span class="p">(</span><span class="mi">2005</span><span class="p">,</span> <span class="mi">7</span><span class="p">,</span> <span class="mi">14</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">t</span> <span class="o">=</span> <span class="n">time</span><span class="p">(</span><span class="mi">12</span><span class="p">,</span> <span class="mi">30</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">datetime</span><span class="o">.</span><span class="n">combine</span><span class="p">(</span><span class="n">d</span><span class="p">,</span> <span class="n">t</span><span class="p">)</span>
<span class="go">datetime.datetime(2005, 7, 14, 12, 30)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="c"># Using datetime.now() or datetime.utcnow()</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">datetime</span><span class="o">.</span><span class="n">now</span><span class="p">()</span>   
<span class="go">datetime.datetime(2007, 12, 6, 16, 29, 43, 79043)   # GMT +1</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">datetime</span><span class="o">.</span><span class="n">utcnow</span><span class="p">()</span>   
<span class="go">datetime.datetime(2007, 12, 6, 15, 29, 43, 79060)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="c"># Using datetime.strptime()</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">dt</span> <span class="o">=</span> <span class="n">datetime</span><span class="o">.</span><span class="n">strptime</span><span class="p">(</span><span class="s">&quot;21/11/06 16:30&quot;</span><span class="p">,</span> <span class="s">&quot;</span><span class="si">%d</span><span class="s">/%m/%y %H:%M&quot;</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">dt</span>
<span class="go">datetime.datetime(2006, 11, 21, 16, 30)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="c"># Using datetime.timetuple() to get tuple of all attributes</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">tt</span> <span class="o">=</span> <span class="n">dt</span><span class="o">.</span><span class="n">timetuple</span><span class="p">()</span>
<span class="gp">&gt;&gt;&gt; </span><span class="k">for</span> <span class="n">it</span> <span class="ow">in</span> <span class="n">tt</span><span class="p">:</span>   
<span class="gp">... </span>    <span class="k">print</span> <span class="n">it</span>
<span class="gp">...</span>
<span class="go">2006    # year</span>
<span class="go">11      # month</span>
<span class="go">21      # day</span>
<span class="go">16      # hour</span>
<span class="go">30      # minute</span>
<span class="go">0       # second</span>
<span class="go">1       # weekday (0 = Monday)</span>
<span class="go">325     # number of days since 1st January</span>
<span class="go">-1      # dst - method tzinfo.dst() returned None</span>
<span class="gp">&gt;&gt;&gt; </span><span class="c"># Date in ISO format</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">ic</span> <span class="o">=</span> <span class="n">dt</span><span class="o">.</span><span class="n">isocalendar</span><span class="p">()</span>
<span class="gp">&gt;&gt;&gt; </span><span class="k">for</span> <span class="n">it</span> <span class="ow">in</span> <span class="n">ic</span><span class="p">:</span>   
<span class="gp">... </span>    <span class="k">print</span> <span class="n">it</span>
<span class="gp">...</span>
<span class="go">2006    # ISO year</span>
<span class="go">47      # ISO week</span>
<span class="go">2       # ISO weekday</span>
<span class="gp">&gt;&gt;&gt; </span><span class="c"># Formatting datetime</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">dt</span><span class="o">.</span><span class="n">strftime</span><span class="p">(</span><span class="s">&quot;%A, </span><span class="si">%d</span><span class="s">. %B %Y %I:%M%p&quot;</span><span class="p">)</span>
<span class="go">&#39;Tuesday, 21. November 2006 04:30PM&#39;</span>
<span class="gp">&gt;&gt;&gt; </span><span class="s">&#39;The {1} is {0:</span><span class="si">%d</span><span class="s">}, the {2} is {0:%B}, the {3} is {0:%I:%M%p}.&#39;</span><span class="o">.</span><span class="n">format</span><span class="p">(</span><span class="n">dt</span><span class="p">,</span> <span class="s">&quot;day&quot;</span><span class="p">,</span> <span class="s">&quot;month&quot;</span><span class="p">,</span> <span class="s">&quot;time&quot;</span><span class="p">)</span>
<span class="go">&#39;The day is 21, the month is November, the time is 04:30PM.&#39;</span>
</pre></div>
</div>
<p>Using datetime with tzinfo:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">datetime</span> <span class="kn">import</span> <span class="n">timedelta</span><span class="p">,</span> <span class="n">datetime</span><span class="p">,</span> <span class="n">tzinfo</span>
<span class="gp">&gt;&gt;&gt; </span><span class="k">class</span> <span class="nc">GMT1</span><span class="p">(</span><span class="n">tzinfo</span><span class="p">):</span>
<span class="gp">... </span>    <span class="k">def</span> <span class="nf">utcoffset</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">dt</span><span class="p">):</span>
<span class="gp">... </span>        <span class="k">return</span> <span class="n">timedelta</span><span class="p">(</span><span class="n">hours</span><span class="o">=</span><span class="mi">1</span><span class="p">)</span> <span class="o">+</span> <span class="bp">self</span><span class="o">.</span><span class="n">dst</span><span class="p">(</span><span class="n">dt</span><span class="p">)</span>
<span class="gp">... </span>    <span class="k">def</span> <span class="nf">dst</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">dt</span><span class="p">):</span>
<span class="gp">... </span>        <span class="c"># DST starts last Sunday in March</span>
<span class="gp">... </span>        <span class="n">d</span> <span class="o">=</span> <span class="n">datetime</span><span class="p">(</span><span class="n">dt</span><span class="o">.</span><span class="n">year</span><span class="p">,</span> <span class="mi">4</span><span class="p">,</span> <span class="mi">1</span><span class="p">)</span>   <span class="c"># ends last Sunday in October</span>
<span class="gp">... </span>        <span class="bp">self</span><span class="o">.</span><span class="n">dston</span> <span class="o">=</span> <span class="n">d</span> <span class="o">-</span> <span class="n">timedelta</span><span class="p">(</span><span class="n">days</span><span class="o">=</span><span class="n">d</span><span class="o">.</span><span class="n">weekday</span><span class="p">()</span> <span class="o">+</span> <span class="mi">1</span><span class="p">)</span>
<span class="gp">... </span>        <span class="n">d</span> <span class="o">=</span> <span class="n">datetime</span><span class="p">(</span><span class="n">dt</span><span class="o">.</span><span class="n">year</span><span class="p">,</span> <span class="mi">11</span><span class="p">,</span> <span class="mi">1</span><span class="p">)</span>
<span class="gp">... </span>        <span class="bp">self</span><span class="o">.</span><span class="n">dstoff</span> <span class="o">=</span> <span class="n">d</span> <span class="o">-</span> <span class="n">timedelta</span><span class="p">(</span><span class="n">days</span><span class="o">=</span><span class="n">d</span><span class="o">.</span><span class="n">weekday</span><span class="p">()</span> <span class="o">+</span> <span class="mi">1</span><span class="p">)</span>
<span class="gp">... </span>        <span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">dston</span> <span class="o">&lt;=</span>  <span class="n">dt</span><span class="o">.</span><span class="n">replace</span><span class="p">(</span><span class="n">tzinfo</span><span class="o">=</span><span class="bp">None</span><span class="p">)</span> <span class="o">&lt;</span> <span class="bp">self</span><span class="o">.</span><span class="n">dstoff</span><span class="p">:</span>
<span class="gp">... </span>            <span class="k">return</span> <span class="n">timedelta</span><span class="p">(</span><span class="n">hours</span><span class="o">=</span><span class="mi">1</span><span class="p">)</span>
<span class="gp">... </span>        <span class="k">else</span><span class="p">:</span>
<span class="gp">... </span>            <span class="k">return</span> <span class="n">timedelta</span><span class="p">(</span><span class="mi">0</span><span class="p">)</span>
<span class="gp">... </span>    <span class="k">def</span> <span class="nf">tzname</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span><span class="n">dt</span><span class="p">):</span>
<span class="gp">... </span>         <span class="k">return</span> <span class="s">&quot;GMT +1&quot;</span>
<span class="gp">...</span>
<span class="gp">&gt;&gt;&gt; </span><span class="k">class</span> <span class="nc">GMT2</span><span class="p">(</span><span class="n">tzinfo</span><span class="p">):</span>
<span class="gp">... </span>    <span class="k">def</span> <span class="nf">utcoffset</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">dt</span><span class="p">):</span>
<span class="gp">... </span>        <span class="k">return</span> <span class="n">timedelta</span><span class="p">(</span><span class="n">hours</span><span class="o">=</span><span class="mi">2</span><span class="p">)</span> <span class="o">+</span> <span class="bp">self</span><span class="o">.</span><span class="n">dst</span><span class="p">(</span><span class="n">dt</span><span class="p">)</span>
<span class="gp">... </span>    <span class="k">def</span> <span class="nf">dst</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">dt</span><span class="p">):</span>
<span class="gp">... </span>        <span class="n">d</span> <span class="o">=</span> <span class="n">datetime</span><span class="p">(</span><span class="n">dt</span><span class="o">.</span><span class="n">year</span><span class="p">,</span> <span class="mi">4</span><span class="p">,</span> <span class="mi">1</span><span class="p">)</span>
<span class="gp">... </span>        <span class="bp">self</span><span class="o">.</span><span class="n">dston</span> <span class="o">=</span> <span class="n">d</span> <span class="o">-</span> <span class="n">timedelta</span><span class="p">(</span><span class="n">days</span><span class="o">=</span><span class="n">d</span><span class="o">.</span><span class="n">weekday</span><span class="p">()</span> <span class="o">+</span> <span class="mi">1</span><span class="p">)</span>
<span class="gp">... </span>        <span class="n">d</span> <span class="o">=</span> <span class="n">datetime</span><span class="p">(</span><span class="n">dt</span><span class="o">.</span><span class="n">year</span><span class="p">,</span> <span class="mi">11</span><span class="p">,</span> <span class="mi">1</span><span class="p">)</span>
<span class="gp">... </span>        <span class="bp">self</span><span class="o">.</span><span class="n">dstoff</span> <span class="o">=</span> <span class="n">d</span> <span class="o">-</span> <span class="n">timedelta</span><span class="p">(</span><span class="n">days</span><span class="o">=</span><span class="n">d</span><span class="o">.</span><span class="n">weekday</span><span class="p">()</span> <span class="o">+</span> <span class="mi">1</span><span class="p">)</span>
<span class="gp">... </span>        <span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">dston</span> <span class="o">&lt;=</span>  <span class="n">dt</span><span class="o">.</span><span class="n">replace</span><span class="p">(</span><span class="n">tzinfo</span><span class="o">=</span><span class="bp">None</span><span class="p">)</span> <span class="o">&lt;</span> <span class="bp">self</span><span class="o">.</span><span class="n">dstoff</span><span class="p">:</span>
<span class="gp">... </span>            <span class="k">return</span> <span class="n">timedelta</span><span class="p">(</span><span class="n">hours</span><span class="o">=</span><span class="mi">1</span><span class="p">)</span>
<span class="gp">... </span>        <span class="k">else</span><span class="p">:</span>
<span class="gp">... </span>            <span class="k">return</span> <span class="n">timedelta</span><span class="p">(</span><span class="mi">0</span><span class="p">)</span>
<span class="gp">... </span>    <span class="k">def</span> <span class="nf">tzname</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span><span class="n">dt</span><span class="p">):</span>
<span class="gp">... </span>        <span class="k">return</span> <span class="s">&quot;GMT +2&quot;</span>
<span class="gp">...</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">gmt1</span> <span class="o">=</span> <span class="n">GMT1</span><span class="p">()</span>
<span class="gp">&gt;&gt;&gt; </span><span class="c"># Daylight Saving Time</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">dt1</span> <span class="o">=</span> <span class="n">datetime</span><span class="p">(</span><span class="mi">2006</span><span class="p">,</span> <span class="mi">11</span><span class="p">,</span> <span class="mi">21</span><span class="p">,</span> <span class="mi">16</span><span class="p">,</span> <span class="mi">30</span><span class="p">,</span> <span class="n">tzinfo</span><span class="o">=</span><span class="n">gmt1</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">dt1</span><span class="o">.</span><span class="n">dst</span><span class="p">()</span>
<span class="go">datetime.timedelta(0)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">dt1</span><span class="o">.</span><span class="n">utcoffset</span><span class="p">()</span>
<span class="go">datetime.timedelta(0, 3600)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">dt2</span> <span class="o">=</span> <span class="n">datetime</span><span class="p">(</span><span class="mi">2006</span><span class="p">,</span> <span class="mi">6</span><span class="p">,</span> <span class="mi">14</span><span class="p">,</span> <span class="mi">13</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="n">tzinfo</span><span class="o">=</span><span class="n">gmt1</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">dt2</span><span class="o">.</span><span class="n">dst</span><span class="p">()</span>
<span class="go">datetime.timedelta(0, 3600)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">dt2</span><span class="o">.</span><span class="n">utcoffset</span><span class="p">()</span>
<span class="go">datetime.timedelta(0, 7200)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="c"># Convert datetime to another time zone</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">dt3</span> <span class="o">=</span> <span class="n">dt2</span><span class="o">.</span><span class="n">astimezone</span><span class="p">(</span><span class="n">GMT2</span><span class="p">())</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">dt3</span>     
<span class="go">datetime.datetime(2006, 6, 14, 14, 0, tzinfo=&lt;GMT2 object at 0x...&gt;)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">dt2</span>     
<span class="go">datetime.datetime(2006, 6, 14, 13, 0, tzinfo=&lt;GMT1 object at 0x...&gt;)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">dt2</span><span class="o">.</span><span class="n">utctimetuple</span><span class="p">()</span> <span class="o">==</span> <span class="n">dt3</span><span class="o">.</span><span class="n">utctimetuple</span><span class="p">()</span>
<span class="go">True</span>
</pre></div>
</div>
</div>
<div class="section" id="time-objects">
<span id="datetime-time"></span><h2>8.1.5. <a class="reference internal" href="time.html#module-time" title="time: Time access and conversions."><tt class="xref py py-class docutils literal"><span class="pre">time</span></tt></a> Objects<a class="headerlink" href="#time-objects" title="Permalink to this headline">¶</a></h2>
<p>A time object represents a (local) time of day, independent of any particular
day, and subject to adjustment via a <a class="reference internal" href="#datetime.tzinfo" title="datetime.tzinfo"><tt class="xref py py-class docutils literal"><span class="pre">tzinfo</span></tt></a> object.</p>
<dl class="class">
<dt id="datetime.time">
<em class="property">class </em><tt class="descclassname">datetime.</tt><tt class="descname">time</tt><big>(</big><span class="optional">[</span><em>hour</em><span class="optional">[</span>, <em>minute</em><span class="optional">[</span>, <em>second</em><span class="optional">[</span>, <em>microsecond</em><span class="optional">[</span>, <em>tzinfo</em><span class="optional">]</span><span class="optional">]</span><span class="optional">]</span><span class="optional">]</span><span class="optional">]</span><big>)</big><a class="headerlink" href="#datetime.time" title="Permalink to this definition">¶</a></dt>
<dd><p>All arguments are optional.  <em>tzinfo</em> may be <tt class="docutils literal"><span class="pre">None</span></tt>, or an instance of a
<a class="reference internal" href="#datetime.tzinfo" title="datetime.tzinfo"><tt class="xref py py-class docutils literal"><span class="pre">tzinfo</span></tt></a> subclass.  The remaining arguments may be ints or longs, in the
following ranges:</p>
<ul class="simple">
<li><tt class="docutils literal"><span class="pre">0</span> <span class="pre">&lt;=</span> <span class="pre">hour</span> <span class="pre">&lt;</span> <span class="pre">24</span></tt></li>
<li><tt class="docutils literal"><span class="pre">0</span> <span class="pre">&lt;=</span> <span class="pre">minute</span> <span class="pre">&lt;</span> <span class="pre">60</span></tt></li>
<li><tt class="docutils literal"><span class="pre">0</span> <span class="pre">&lt;=</span> <span class="pre">second</span> <span class="pre">&lt;</span> <span class="pre">60</span></tt></li>
<li><tt class="docutils literal"><span class="pre">0</span> <span class="pre">&lt;=</span> <span class="pre">microsecond</span> <span class="pre">&lt;</span> <span class="pre">1000000</span></tt>.</li>
</ul>
<p>If an argument outside those ranges is given, <a class="reference internal" href="exceptions.html#exceptions.ValueError" title="exceptions.ValueError"><tt class="xref py py-exc docutils literal"><span class="pre">ValueError</span></tt></a> is raised.  All
default to <tt class="docutils literal"><span class="pre">0</span></tt> except <em>tzinfo</em>, which defaults to <a class="reference internal" href="constants.html#None" title="None"><tt class="xref py py-const docutils literal"><span class="pre">None</span></tt></a>.</p>
</dd></dl>

<p>Class attributes:</p>
<dl class="attribute">
<dt id="datetime.time.min">
<tt class="descclassname">time.</tt><tt class="descname">min</tt><a class="headerlink" href="#datetime.time.min" title="Permalink to this definition">¶</a></dt>
<dd><p>The earliest representable <a class="reference internal" href="#datetime.time" title="datetime.time"><tt class="xref py py-class docutils literal"><span class="pre">time</span></tt></a>, <tt class="docutils literal"><span class="pre">time(0,</span> <span class="pre">0,</span> <span class="pre">0,</span> <span class="pre">0)</span></tt>.</p>
</dd></dl>

<dl class="attribute">
<dt id="datetime.time.max">
<tt class="descclassname">time.</tt><tt class="descname">max</tt><a class="headerlink" href="#datetime.time.max" title="Permalink to this definition">¶</a></dt>
<dd><p>The latest representable <a class="reference internal" href="#datetime.time" title="datetime.time"><tt class="xref py py-class docutils literal"><span class="pre">time</span></tt></a>, <tt class="docutils literal"><span class="pre">time(23,</span> <span class="pre">59,</span> <span class="pre">59,</span> <span class="pre">999999)</span></tt>.</p>
</dd></dl>

<dl class="attribute">
<dt id="datetime.time.resolution">
<tt class="descclassname">time.</tt><tt class="descname">resolution</tt><a class="headerlink" href="#datetime.time.resolution" title="Permalink to this definition">¶</a></dt>
<dd><p>The smallest possible difference between non-equal <a class="reference internal" href="#datetime.time" title="datetime.time"><tt class="xref py py-class docutils literal"><span class="pre">time</span></tt></a> objects,
<tt class="docutils literal"><span class="pre">timedelta(microseconds=1)</span></tt>, although note that arithmetic on
<a class="reference internal" href="#datetime.time" title="datetime.time"><tt class="xref py py-class docutils literal"><span class="pre">time</span></tt></a> objects is not supported.</p>
</dd></dl>

<p>Instance attributes (read-only):</p>
<dl class="attribute">
<dt id="datetime.time.hour">
<tt class="descclassname">time.</tt><tt class="descname">hour</tt><a class="headerlink" href="#datetime.time.hour" title="Permalink to this definition">¶</a></dt>
<dd><p>In <tt class="docutils literal"><span class="pre">range(24)</span></tt>.</p>
</dd></dl>

<dl class="attribute">
<dt id="datetime.time.minute">
<tt class="descclassname">time.</tt><tt class="descname">minute</tt><a class="headerlink" href="#datetime.time.minute" title="Permalink to this definition">¶</a></dt>
<dd><p>In <tt class="docutils literal"><span class="pre">range(60)</span></tt>.</p>
</dd></dl>

<dl class="attribute">
<dt id="datetime.time.second">
<tt class="descclassname">time.</tt><tt class="descname">second</tt><a class="headerlink" href="#datetime.time.second" title="Permalink to this definition">¶</a></dt>
<dd><p>In <tt class="docutils literal"><span class="pre">range(60)</span></tt>.</p>
</dd></dl>

<dl class="attribute">
<dt id="datetime.time.microsecond">
<tt class="descclassname">time.</tt><tt class="descname">microsecond</tt><a class="headerlink" href="#datetime.time.microsecond" title="Permalink to this definition">¶</a></dt>
<dd><p>In <tt class="docutils literal"><span class="pre">range(1000000)</span></tt>.</p>
</dd></dl>

<dl class="attribute">
<dt id="datetime.time.tzinfo">
<tt class="descclassname">time.</tt><tt class="descname">tzinfo</tt><a class="headerlink" href="#datetime.time.tzinfo" title="Permalink to this definition">¶</a></dt>
<dd><p>The object passed as the tzinfo argument to the <a class="reference internal" href="#datetime.time" title="datetime.time"><tt class="xref py py-class docutils literal"><span class="pre">time</span></tt></a> constructor, or
<tt class="docutils literal"><span class="pre">None</span></tt> if none was passed.</p>
</dd></dl>

<p>Supported operations:</p>
<ul class="simple">
<li>comparison of <a class="reference internal" href="#datetime.time" title="datetime.time"><tt class="xref py py-class docutils literal"><span class="pre">time</span></tt></a> to <a class="reference internal" href="#datetime.time" title="datetime.time"><tt class="xref py py-class docutils literal"><span class="pre">time</span></tt></a>, where <em>a</em> is considered less
than <em>b</em> when <em>a</em> precedes <em>b</em> in time.  If one comparand is naive and the other
is aware, <a class="reference internal" href="exceptions.html#exceptions.TypeError" title="exceptions.TypeError"><tt class="xref py py-exc docutils literal"><span class="pre">TypeError</span></tt></a> is raised.  If both comparands are aware, and have
the same <a class="reference internal" href="#datetime.tzinfo" title="datetime.tzinfo"><tt class="xref py py-attr docutils literal"><span class="pre">tzinfo</span></tt></a> attribute, the common <a class="reference internal" href="#datetime.tzinfo" title="datetime.tzinfo"><tt class="xref py py-attr docutils literal"><span class="pre">tzinfo</span></tt></a> attribute is
ignored and the base times are compared.  If both comparands are aware and
have different <a class="reference internal" href="#datetime.tzinfo" title="datetime.tzinfo"><tt class="xref py py-attr docutils literal"><span class="pre">tzinfo</span></tt></a> attributes, the comparands are first adjusted by
subtracting their UTC offsets (obtained from <tt class="docutils literal"><span class="pre">self.utcoffset()</span></tt>). In order
to stop mixed-type comparisons from falling back to the default comparison by
object address, when a <a class="reference internal" href="#datetime.time" title="datetime.time"><tt class="xref py py-class docutils literal"><span class="pre">time</span></tt></a> object is compared to an object of a
different type, <a class="reference internal" href="exceptions.html#exceptions.TypeError" title="exceptions.TypeError"><tt class="xref py py-exc docutils literal"><span class="pre">TypeError</span></tt></a> is raised unless the comparison is <tt class="docutils literal"><span class="pre">==</span></tt> or
<tt class="docutils literal"><span class="pre">!=</span></tt>.  The latter cases return <a class="reference internal" href="constants.html#False" title="False"><tt class="xref py py-const docutils literal"><span class="pre">False</span></tt></a> or <a class="reference internal" href="constants.html#True" title="True"><tt class="xref py py-const docutils literal"><span class="pre">True</span></tt></a>, respectively.</li>
<li>hash, use as dict key</li>
<li>efficient pickling</li>
<li>in Boolean contexts, a <a class="reference internal" href="#datetime.time" title="datetime.time"><tt class="xref py py-class docutils literal"><span class="pre">time</span></tt></a> object is considered to be true if and
only if, after converting it to minutes and subtracting <tt class="xref py py-meth docutils literal"><span class="pre">utcoffset()</span></tt> (or
<tt class="docutils literal"><span class="pre">0</span></tt> if that&#8217;s <tt class="docutils literal"><span class="pre">None</span></tt>), the result is non-zero.</li>
</ul>
<p>Instance methods:</p>
<dl class="method">
<dt id="datetime.time.replace">
<tt class="descclassname">time.</tt><tt class="descname">replace</tt><big>(</big><span class="optional">[</span><em>hour</em><span class="optional">[</span>, <em>minute</em><span class="optional">[</span>, <em>second</em><span class="optional">[</span>, <em>microsecond</em><span class="optional">[</span>, <em>tzinfo</em><span class="optional">]</span><span class="optional">]</span><span class="optional">]</span><span class="optional">]</span><span class="optional">]</span><big>)</big><a class="headerlink" href="#datetime.time.replace" title="Permalink to this definition">¶</a></dt>
<dd><p>Return a <a class="reference internal" href="#datetime.time" title="datetime.time"><tt class="xref py py-class docutils literal"><span class="pre">time</span></tt></a> with the same value, except for those attributes given
new values by whichever keyword arguments are specified.  Note that
<tt class="docutils literal"><span class="pre">tzinfo=None</span></tt> can be specified to create a naive <a class="reference internal" href="#datetime.time" title="datetime.time"><tt class="xref py py-class docutils literal"><span class="pre">time</span></tt></a> from an
aware <a class="reference internal" href="#datetime.time" title="datetime.time"><tt class="xref py py-class docutils literal"><span class="pre">time</span></tt></a>, without conversion of the time data.</p>
</dd></dl>

<dl class="method">
<dt id="datetime.time.isoformat">
<tt class="descclassname">time.</tt><tt class="descname">isoformat</tt><big>(</big><big>)</big><a class="headerlink" href="#datetime.time.isoformat" title="Permalink to this definition">¶</a></dt>
<dd><p>Return a string representing the time in ISO 8601 format, HH:MM:SS.mmmmmm or, if
self.microsecond is 0, HH:MM:SS If <a class="reference internal" href="#datetime.time.utcoffset" title="datetime.time.utcoffset"><tt class="xref py py-meth docutils literal"><span class="pre">utcoffset()</span></tt></a> does not return <tt class="docutils literal"><span class="pre">None</span></tt>, a
6-character string is appended, giving the UTC offset in (signed) hours and
minutes: HH:MM:SS.mmmmmm+HH:MM or, if self.microsecond is 0, HH:MM:SS+HH:MM</p>
</dd></dl>

<dl class="method">
<dt id="datetime.time.__str__">
<tt class="descclassname">time.</tt><tt class="descname">__str__</tt><big>(</big><big>)</big><a class="headerlink" href="#datetime.time.__str__" title="Permalink to this definition">¶</a></dt>
<dd><p>For a time <em>t</em>, <tt class="docutils literal"><span class="pre">str(t)</span></tt> is equivalent to <tt class="docutils literal"><span class="pre">t.isoformat()</span></tt>.</p>
</dd></dl>

<dl class="method">
<dt id="datetime.time.strftime">
<tt class="descclassname">time.</tt><tt class="descname">strftime</tt><big>(</big><em>format</em><big>)</big><a class="headerlink" href="#datetime.time.strftime" title="Permalink to this definition">¶</a></dt>
<dd><p>Return a string representing the time, controlled by an explicit format string.
See section <a class="reference internal" href="#strftime-strptime-behavior"><em>strftime() and strptime() Behavior</em></a>.</p>
</dd></dl>

<dl class="method">
<dt id="datetime.time.__format__">
<tt class="descclassname">time.</tt><tt class="descname">__format__</tt><big>(</big><em>format</em><big>)</big><a class="headerlink" href="#datetime.time.__format__" title="Permalink to this definition">¶</a></dt>
<dd><p>Same as <a class="reference internal" href="#datetime.time.strftime" title="datetime.time.strftime"><tt class="xref py py-meth docutils literal"><span class="pre">time.strftime()</span></tt></a>. This makes it possible to specify format string
for a <a class="reference internal" href="#datetime.time" title="datetime.time"><tt class="xref py py-class docutils literal"><span class="pre">time</span></tt></a> object when using <a class="reference internal" href="stdtypes.html#str.format" title="str.format"><tt class="xref py py-meth docutils literal"><span class="pre">str.format()</span></tt></a>.
See section <a class="reference internal" href="#strftime-strptime-behavior"><em>strftime() and strptime() Behavior</em></a>.</p>
</dd></dl>

<dl class="method">
<dt id="datetime.time.utcoffset">
<tt class="descclassname">time.</tt><tt class="descname">utcoffset</tt><big>(</big><big>)</big><a class="headerlink" href="#datetime.time.utcoffset" title="Permalink to this definition">¶</a></dt>
<dd><p>If <a class="reference internal" href="#datetime.tzinfo" title="datetime.tzinfo"><tt class="xref py py-attr docutils literal"><span class="pre">tzinfo</span></tt></a> is <tt class="docutils literal"><span class="pre">None</span></tt>, returns <tt class="docutils literal"><span class="pre">None</span></tt>, else returns
<tt class="docutils literal"><span class="pre">self.tzinfo.utcoffset(None)</span></tt>, and raises an exception if the latter doesn&#8217;t
return <tt class="docutils literal"><span class="pre">None</span></tt> or a <a class="reference internal" href="#datetime.timedelta" title="datetime.timedelta"><tt class="xref py py-class docutils literal"><span class="pre">timedelta</span></tt></a> object representing a whole number of
minutes with magnitude less than one day.</p>
</dd></dl>

<dl class="method">
<dt id="datetime.time.dst">
<tt class="descclassname">time.</tt><tt class="descname">dst</tt><big>(</big><big>)</big><a class="headerlink" href="#datetime.time.dst" title="Permalink to this definition">¶</a></dt>
<dd><p>If <a class="reference internal" href="#datetime.tzinfo" title="datetime.tzinfo"><tt class="xref py py-attr docutils literal"><span class="pre">tzinfo</span></tt></a> is <tt class="docutils literal"><span class="pre">None</span></tt>, returns <tt class="docutils literal"><span class="pre">None</span></tt>, else returns
<tt class="docutils literal"><span class="pre">self.tzinfo.dst(None)</span></tt>, and raises an exception if the latter doesn&#8217;t return
<tt class="docutils literal"><span class="pre">None</span></tt>, or a <a class="reference internal" href="#datetime.timedelta" title="datetime.timedelta"><tt class="xref py py-class docutils literal"><span class="pre">timedelta</span></tt></a> object representing a whole number of minutes
with magnitude less than one day.</p>
</dd></dl>

<dl class="method">
<dt id="datetime.time.tzname">
<tt class="descclassname">time.</tt><tt class="descname">tzname</tt><big>(</big><big>)</big><a class="headerlink" href="#datetime.time.tzname" title="Permalink to this definition">¶</a></dt>
<dd><p>If <a class="reference internal" href="#datetime.tzinfo" title="datetime.tzinfo"><tt class="xref py py-attr docutils literal"><span class="pre">tzinfo</span></tt></a> is <tt class="docutils literal"><span class="pre">None</span></tt>, returns <tt class="docutils literal"><span class="pre">None</span></tt>, else returns
<tt class="docutils literal"><span class="pre">self.tzinfo.tzname(None)</span></tt>, or raises an exception if the latter doesn&#8217;t
return <tt class="docutils literal"><span class="pre">None</span></tt> or a string object.</p>
</dd></dl>

<p>Example:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">datetime</span> <span class="kn">import</span> <span class="n">time</span><span class="p">,</span> <span class="n">tzinfo</span>
<span class="gp">&gt;&gt;&gt; </span><span class="k">class</span> <span class="nc">GMT1</span><span class="p">(</span><span class="n">tzinfo</span><span class="p">):</span>
<span class="gp">... </span>    <span class="k">def</span> <span class="nf">utcoffset</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">dt</span><span class="p">):</span>
<span class="gp">... </span>        <span class="k">return</span> <span class="n">timedelta</span><span class="p">(</span><span class="n">hours</span><span class="o">=</span><span class="mi">1</span><span class="p">)</span>
<span class="gp">... </span>    <span class="k">def</span> <span class="nf">dst</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">dt</span><span class="p">):</span>
<span class="gp">... </span>        <span class="k">return</span> <span class="n">timedelta</span><span class="p">(</span><span class="mi">0</span><span class="p">)</span>
<span class="gp">... </span>    <span class="k">def</span> <span class="nf">tzname</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span><span class="n">dt</span><span class="p">):</span>
<span class="gp">... </span>        <span class="k">return</span> <span class="s">&quot;Europe/Prague&quot;</span>
<span class="gp">...</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">t</span> <span class="o">=</span> <span class="n">time</span><span class="p">(</span><span class="mi">12</span><span class="p">,</span> <span class="mi">10</span><span class="p">,</span> <span class="mi">30</span><span class="p">,</span> <span class="n">tzinfo</span><span class="o">=</span><span class="n">GMT1</span><span class="p">())</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">t</span>                               
<span class="go">datetime.time(12, 10, 30, tzinfo=&lt;GMT1 object at 0x...&gt;)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">gmt</span> <span class="o">=</span> <span class="n">GMT1</span><span class="p">()</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">t</span><span class="o">.</span><span class="n">isoformat</span><span class="p">()</span>
<span class="go">&#39;12:10:30+01:00&#39;</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">t</span><span class="o">.</span><span class="n">dst</span><span class="p">()</span>
<span class="go">datetime.timedelta(0)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">t</span><span class="o">.</span><span class="n">tzname</span><span class="p">()</span>
<span class="go">&#39;Europe/Prague&#39;</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">t</span><span class="o">.</span><span class="n">strftime</span><span class="p">(</span><span class="s">&quot;%H:%M:%S %Z&quot;</span><span class="p">)</span>
<span class="go">&#39;12:10:30 Europe/Prague&#39;</span>
<span class="gp">&gt;&gt;&gt; </span><span class="s">&#39;The {} is {:%H:%M}.&#39;</span><span class="o">.</span><span class="n">format</span><span class="p">(</span><span class="s">&quot;time&quot;</span><span class="p">,</span> <span class="n">t</span><span class="p">)</span>
<span class="go">&#39;The time is 12:10.&#39;</span>
</pre></div>
</div>
</div>
<div class="section" id="tzinfo-objects">
<span id="datetime-tzinfo"></span><h2>8.1.6. <a class="reference internal" href="#datetime.tzinfo" title="datetime.tzinfo"><tt class="xref py py-class docutils literal"><span class="pre">tzinfo</span></tt></a> Objects<a class="headerlink" href="#tzinfo-objects" title="Permalink to this headline">¶</a></h2>
<p><a class="reference internal" href="#datetime.tzinfo" title="datetime.tzinfo"><tt class="xref py py-class docutils literal"><span class="pre">tzinfo</span></tt></a> is an abstract base class, meaning that this class should not be
instantiated directly.  You need to derive a concrete subclass, and (at least)
supply implementations of the standard <a class="reference internal" href="#datetime.tzinfo" title="datetime.tzinfo"><tt class="xref py py-class docutils literal"><span class="pre">tzinfo</span></tt></a> methods needed by the
<a class="reference internal" href="#datetime.datetime" title="datetime.datetime"><tt class="xref py py-class docutils literal"><span class="pre">datetime</span></tt></a> methods you use.  The <a class="reference internal" href="#module-datetime" title="datetime: Basic date and time types."><tt class="xref py py-mod docutils literal"><span class="pre">datetime</span></tt></a> module does not supply
any concrete subclasses of <a class="reference internal" href="#datetime.tzinfo" title="datetime.tzinfo"><tt class="xref py py-class docutils literal"><span class="pre">tzinfo</span></tt></a>.</p>
<p>An instance of (a concrete subclass of) <a class="reference internal" href="#datetime.tzinfo" title="datetime.tzinfo"><tt class="xref py py-class docutils literal"><span class="pre">tzinfo</span></tt></a> can be passed to the
constructors for <a class="reference internal" href="#datetime.datetime" title="datetime.datetime"><tt class="xref py py-class docutils literal"><span class="pre">datetime</span></tt></a> and <a class="reference internal" href="#datetime.time" title="datetime.time"><tt class="xref py py-class docutils literal"><span class="pre">time</span></tt></a> objects. The latter objects
view their attributes as being in local time, and the <a class="reference internal" href="#datetime.tzinfo" title="datetime.tzinfo"><tt class="xref py py-class docutils literal"><span class="pre">tzinfo</span></tt></a> object
supports methods revealing offset of local time from UTC, the name of the time
zone, and DST offset, all relative to a date or time object passed to them.</p>
<p>Special requirement for pickling:  A <a class="reference internal" href="#datetime.tzinfo" title="datetime.tzinfo"><tt class="xref py py-class docutils literal"><span class="pre">tzinfo</span></tt></a> subclass must have an
<a class="reference internal" href="../reference/datamodel.html#object.__init__" title="object.__init__"><tt class="xref py py-meth docutils literal"><span class="pre">__init__()</span></tt></a> method that can be called with no arguments, else it can be
pickled but possibly not unpickled again.  This is a technical requirement that
may be relaxed in the future.</p>
<p>A concrete subclass of <a class="reference internal" href="#datetime.tzinfo" title="datetime.tzinfo"><tt class="xref py py-class docutils literal"><span class="pre">tzinfo</span></tt></a> may need to implement the following
methods.  Exactly which methods are needed depends on the uses made of aware
<a class="reference internal" href="#module-datetime" title="datetime: Basic date and time types."><tt class="xref py py-mod docutils literal"><span class="pre">datetime</span></tt></a> objects.  If in doubt, simply implement all of them.</p>
<dl class="method">
<dt id="datetime.tzinfo.utcoffset">
<tt class="descclassname">tzinfo.</tt><tt class="descname">utcoffset</tt><big>(</big><em>self</em>, <em>dt</em><big>)</big><a class="headerlink" href="#datetime.tzinfo.utcoffset" title="Permalink to this definition">¶</a></dt>
<dd><p>Return offset of local time from UTC, in minutes east of UTC.  If local time is
west of UTC, this should be negative.  Note that this is intended to be the
total offset from UTC; for example, if a <a class="reference internal" href="#datetime.tzinfo" title="datetime.tzinfo"><tt class="xref py py-class docutils literal"><span class="pre">tzinfo</span></tt></a> object represents both
time zone and DST adjustments, <a class="reference internal" href="#datetime.tzinfo.utcoffset" title="datetime.tzinfo.utcoffset"><tt class="xref py py-meth docutils literal"><span class="pre">utcoffset()</span></tt></a> should return their sum.  If
the UTC offset isn&#8217;t known, return <tt class="docutils literal"><span class="pre">None</span></tt>.  Else the value returned must be a
<a class="reference internal" href="#datetime.timedelta" title="datetime.timedelta"><tt class="xref py py-class docutils literal"><span class="pre">timedelta</span></tt></a> object specifying a whole number of minutes in the range
-1439 to 1439 inclusive (1440 = 24*60; the magnitude of the offset must be less
than one day).  Most implementations of <a class="reference internal" href="#datetime.tzinfo.utcoffset" title="datetime.tzinfo.utcoffset"><tt class="xref py py-meth docutils literal"><span class="pre">utcoffset()</span></tt></a> will probably look
like one of these two:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="k">return</span> <span class="n">CONSTANT</span>                 <span class="c"># fixed-offset class</span>
<span class="k">return</span> <span class="n">CONSTANT</span> <span class="o">+</span> <span class="bp">self</span><span class="o">.</span><span class="n">dst</span><span class="p">(</span><span class="n">dt</span><span class="p">)</span>  <span class="c"># daylight-aware class</span>
</pre></div>
</div>
<p>If <a class="reference internal" href="#datetime.tzinfo.utcoffset" title="datetime.tzinfo.utcoffset"><tt class="xref py py-meth docutils literal"><span class="pre">utcoffset()</span></tt></a> does not return <tt class="docutils literal"><span class="pre">None</span></tt>, <a class="reference internal" href="#datetime.tzinfo.dst" title="datetime.tzinfo.dst"><tt class="xref py py-meth docutils literal"><span class="pre">dst()</span></tt></a> should not return
<tt class="docutils literal"><span class="pre">None</span></tt> either.</p>
<p>The default implementation of <a class="reference internal" href="#datetime.tzinfo.utcoffset" title="datetime.tzinfo.utcoffset"><tt class="xref py py-meth docutils literal"><span class="pre">utcoffset()</span></tt></a> raises
<a class="reference internal" href="exceptions.html#exceptions.NotImplementedError" title="exceptions.NotImplementedError"><tt class="xref py py-exc docutils literal"><span class="pre">NotImplementedError</span></tt></a>.</p>
</dd></dl>

<dl class="method">
<dt id="datetime.tzinfo.dst">
<tt class="descclassname">tzinfo.</tt><tt class="descname">dst</tt><big>(</big><em>self</em>, <em>dt</em><big>)</big><a class="headerlink" href="#datetime.tzinfo.dst" title="Permalink to this definition">¶</a></dt>
<dd><p>Return the daylight saving time (DST) adjustment, in minutes east of UTC, or
<tt class="docutils literal"><span class="pre">None</span></tt> if DST information isn&#8217;t known.  Return <tt class="docutils literal"><span class="pre">timedelta(0)</span></tt> if DST is not
in effect. If DST is in effect, return the offset as a <a class="reference internal" href="#datetime.timedelta" title="datetime.timedelta"><tt class="xref py py-class docutils literal"><span class="pre">timedelta</span></tt></a> object
(see <a class="reference internal" href="#datetime.tzinfo.utcoffset" title="datetime.tzinfo.utcoffset"><tt class="xref py py-meth docutils literal"><span class="pre">utcoffset()</span></tt></a> for details). Note that DST offset, if applicable, has
already been added to the UTC offset returned by <a class="reference internal" href="#datetime.tzinfo.utcoffset" title="datetime.tzinfo.utcoffset"><tt class="xref py py-meth docutils literal"><span class="pre">utcoffset()</span></tt></a>, so there&#8217;s
no need to consult <a class="reference internal" href="#datetime.tzinfo.dst" title="datetime.tzinfo.dst"><tt class="xref py py-meth docutils literal"><span class="pre">dst()</span></tt></a> unless you&#8217;re interested in obtaining DST info
separately.  For example, <a class="reference internal" href="#datetime.datetime.timetuple" title="datetime.datetime.timetuple"><tt class="xref py py-meth docutils literal"><span class="pre">datetime.timetuple()</span></tt></a> calls its <a class="reference internal" href="#datetime.tzinfo" title="datetime.tzinfo"><tt class="xref py py-attr docutils literal"><span class="pre">tzinfo</span></tt></a>
attribute&#8217;s <a class="reference internal" href="#datetime.tzinfo.dst" title="datetime.tzinfo.dst"><tt class="xref py py-meth docutils literal"><span class="pre">dst()</span></tt></a> method to determine how the <tt class="xref py py-attr docutils literal"><span class="pre">tm_isdst</span></tt> flag
should be set, and <a class="reference internal" href="#datetime.tzinfo.fromutc" title="datetime.tzinfo.fromutc"><tt class="xref py py-meth docutils literal"><span class="pre">tzinfo.fromutc()</span></tt></a> calls <a class="reference internal" href="#datetime.tzinfo.dst" title="datetime.tzinfo.dst"><tt class="xref py py-meth docutils literal"><span class="pre">dst()</span></tt></a> to account for
DST changes when crossing time zones.</p>
<p>An instance <em>tz</em> of a <a class="reference internal" href="#datetime.tzinfo" title="datetime.tzinfo"><tt class="xref py py-class docutils literal"><span class="pre">tzinfo</span></tt></a> subclass that models both standard and
daylight times must be consistent in this sense:</p>
<p><tt class="docutils literal"><span class="pre">tz.utcoffset(dt)</span> <span class="pre">-</span> <span class="pre">tz.dst(dt)</span></tt></p>
<p>must return the same result for every <a class="reference internal" href="#datetime.datetime" title="datetime.datetime"><tt class="xref py py-class docutils literal"><span class="pre">datetime</span></tt></a> <em>dt</em> with <tt class="docutils literal"><span class="pre">dt.tzinfo</span> <span class="pre">==</span>
<span class="pre">tz</span></tt>  For sane <a class="reference internal" href="#datetime.tzinfo" title="datetime.tzinfo"><tt class="xref py py-class docutils literal"><span class="pre">tzinfo</span></tt></a> subclasses, this expression yields the time
zone&#8217;s &#8220;standard offset&#8221;, which should not depend on the date or the time, but
only on geographic location.  The implementation of <a class="reference internal" href="#datetime.datetime.astimezone" title="datetime.datetime.astimezone"><tt class="xref py py-meth docutils literal"><span class="pre">datetime.astimezone()</span></tt></a>
relies on this, but cannot detect violations; it&#8217;s the programmer&#8217;s
responsibility to ensure it.  If a <a class="reference internal" href="#datetime.tzinfo" title="datetime.tzinfo"><tt class="xref py py-class docutils literal"><span class="pre">tzinfo</span></tt></a> subclass cannot guarantee
this, it may be able to override the default implementation of
<a class="reference internal" href="#datetime.tzinfo.fromutc" title="datetime.tzinfo.fromutc"><tt class="xref py py-meth docutils literal"><span class="pre">tzinfo.fromutc()</span></tt></a> to work correctly with <tt class="xref py py-meth docutils literal"><span class="pre">astimezone()</span></tt> regardless.</p>
<p>Most implementations of <a class="reference internal" href="#datetime.tzinfo.dst" title="datetime.tzinfo.dst"><tt class="xref py py-meth docutils literal"><span class="pre">dst()</span></tt></a> will probably look like one of these two:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="k">def</span> <span class="nf">dst</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">dt</span><span class="p">):</span>
    <span class="c"># a fixed-offset class:  doesn&#39;t account for DST</span>
    <span class="k">return</span> <span class="n">timedelta</span><span class="p">(</span><span class="mi">0</span><span class="p">)</span>
</pre></div>
</div>
<p>or</p>
<div class="highlight-python"><div class="highlight"><pre><span class="k">def</span> <span class="nf">dst</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">dt</span><span class="p">):</span>
    <span class="c"># Code to set dston and dstoff to the time zone&#39;s DST</span>
    <span class="c"># transition times based on the input dt.year, and expressed</span>
    <span class="c"># in standard local time.  Then</span>

    <span class="k">if</span> <span class="n">dston</span> <span class="o">&lt;=</span> <span class="n">dt</span><span class="o">.</span><span class="n">replace</span><span class="p">(</span><span class="n">tzinfo</span><span class="o">=</span><span class="bp">None</span><span class="p">)</span> <span class="o">&lt;</span> <span class="n">dstoff</span><span class="p">:</span>
        <span class="k">return</span> <span class="n">timedelta</span><span class="p">(</span><span class="n">hours</span><span class="o">=</span><span class="mi">1</span><span class="p">)</span>
    <span class="k">else</span><span class="p">:</span>
        <span class="k">return</span> <span class="n">timedelta</span><span class="p">(</span><span class="mi">0</span><span class="p">)</span>
</pre></div>
</div>
<p>The default implementation of <a class="reference internal" href="#datetime.tzinfo.dst" title="datetime.tzinfo.dst"><tt class="xref py py-meth docutils literal"><span class="pre">dst()</span></tt></a> raises <a class="reference internal" href="exceptions.html#exceptions.NotImplementedError" title="exceptions.NotImplementedError"><tt class="xref py py-exc docutils literal"><span class="pre">NotImplementedError</span></tt></a>.</p>
</dd></dl>

<dl class="method">
<dt id="datetime.tzinfo.tzname">
<tt class="descclassname">tzinfo.</tt><tt class="descname">tzname</tt><big>(</big><em>self</em>, <em>dt</em><big>)</big><a class="headerlink" href="#datetime.tzinfo.tzname" title="Permalink to this definition">¶</a></dt>
<dd><p>Return the time zone name corresponding to the <a class="reference internal" href="#datetime.datetime" title="datetime.datetime"><tt class="xref py py-class docutils literal"><span class="pre">datetime</span></tt></a> object <em>dt</em>, as
a string. Nothing about string names is defined by the <a class="reference internal" href="#module-datetime" title="datetime: Basic date and time types."><tt class="xref py py-mod docutils literal"><span class="pre">datetime</span></tt></a> module,
and there&#8217;s no requirement that it mean anything in particular.  For example,
&#8220;GMT&#8221;, &#8220;UTC&#8221;, &#8220;-500&#8221;, &#8220;-5:00&#8221;, &#8220;EDT&#8221;, &#8220;US/Eastern&#8221;, &#8220;America/New York&#8221; are all
valid replies.  Return <tt class="docutils literal"><span class="pre">None</span></tt> if a string name isn&#8217;t known.  Note that this is
a method rather than a fixed string primarily because some <a class="reference internal" href="#datetime.tzinfo" title="datetime.tzinfo"><tt class="xref py py-class docutils literal"><span class="pre">tzinfo</span></tt></a>
subclasses will wish to return different names depending on the specific value
of <em>dt</em> passed, especially if the <a class="reference internal" href="#datetime.tzinfo" title="datetime.tzinfo"><tt class="xref py py-class docutils literal"><span class="pre">tzinfo</span></tt></a> class is accounting for
daylight time.</p>
<p>The default implementation of <a class="reference internal" href="#datetime.tzinfo.tzname" title="datetime.tzinfo.tzname"><tt class="xref py py-meth docutils literal"><span class="pre">tzname()</span></tt></a> raises <a class="reference internal" href="exceptions.html#exceptions.NotImplementedError" title="exceptions.NotImplementedError"><tt class="xref py py-exc docutils literal"><span class="pre">NotImplementedError</span></tt></a>.</p>
</dd></dl>

<p>These methods are called by a <a class="reference internal" href="#datetime.datetime" title="datetime.datetime"><tt class="xref py py-class docutils literal"><span class="pre">datetime</span></tt></a> or <a class="reference internal" href="#datetime.time" title="datetime.time"><tt class="xref py py-class docutils literal"><span class="pre">time</span></tt></a> object, in
response to their methods of the same names.  A <a class="reference internal" href="#datetime.datetime" title="datetime.datetime"><tt class="xref py py-class docutils literal"><span class="pre">datetime</span></tt></a> object passes
itself as the argument, and a <a class="reference internal" href="#datetime.time" title="datetime.time"><tt class="xref py py-class docutils literal"><span class="pre">time</span></tt></a> object passes <tt class="docutils literal"><span class="pre">None</span></tt> as the
argument.  A <a class="reference internal" href="#datetime.tzinfo" title="datetime.tzinfo"><tt class="xref py py-class docutils literal"><span class="pre">tzinfo</span></tt></a> subclass&#8217;s methods should therefore be prepared to
accept a <em>dt</em> argument of <tt class="docutils literal"><span class="pre">None</span></tt>, or of class <a class="reference internal" href="#datetime.datetime" title="datetime.datetime"><tt class="xref py py-class docutils literal"><span class="pre">datetime</span></tt></a>.</p>
<p>When <tt class="docutils literal"><span class="pre">None</span></tt> is passed, it&#8217;s up to the class designer to decide the best
response.  For example, returning <tt class="docutils literal"><span class="pre">None</span></tt> is appropriate if the class wishes to
say that time objects don&#8217;t participate in the <a class="reference internal" href="#datetime.tzinfo" title="datetime.tzinfo"><tt class="xref py py-class docutils literal"><span class="pre">tzinfo</span></tt></a> protocols.  It
may be more useful for <tt class="docutils literal"><span class="pre">utcoffset(None)</span></tt> to return the standard UTC offset, as
there is no other convention for discovering the standard offset.</p>
<p>When a <a class="reference internal" href="#datetime.datetime" title="datetime.datetime"><tt class="xref py py-class docutils literal"><span class="pre">datetime</span></tt></a> object is passed in response to a <a class="reference internal" href="#datetime.datetime" title="datetime.datetime"><tt class="xref py py-class docutils literal"><span class="pre">datetime</span></tt></a>
method, <tt class="docutils literal"><span class="pre">dt.tzinfo</span></tt> is the same object as <em>self</em>.  <a class="reference internal" href="#datetime.tzinfo" title="datetime.tzinfo"><tt class="xref py py-class docutils literal"><span class="pre">tzinfo</span></tt></a> methods can
rely on this, unless user code calls <a class="reference internal" href="#datetime.tzinfo" title="datetime.tzinfo"><tt class="xref py py-class docutils literal"><span class="pre">tzinfo</span></tt></a> methods directly.  The
intent is that the <a class="reference internal" href="#datetime.tzinfo" title="datetime.tzinfo"><tt class="xref py py-class docutils literal"><span class="pre">tzinfo</span></tt></a> methods interpret <em>dt</em> as being in local
time, and not need worry about objects in other timezones.</p>
<p>There is one more <a class="reference internal" href="#datetime.tzinfo" title="datetime.tzinfo"><tt class="xref py py-class docutils literal"><span class="pre">tzinfo</span></tt></a> method that a subclass may wish to override:</p>
<dl class="method">
<dt id="datetime.tzinfo.fromutc">
<tt class="descclassname">tzinfo.</tt><tt class="descname">fromutc</tt><big>(</big><em>self</em>, <em>dt</em><big>)</big><a class="headerlink" href="#datetime.tzinfo.fromutc" title="Permalink to this definition">¶</a></dt>
<dd><p>This is called from the default <a class="reference internal" href="#datetime.datetime.astimezone" title="datetime.datetime.astimezone"><tt class="xref py py-class docutils literal"><span class="pre">datetime.astimezone()</span></tt></a>
implementation.  When called from that, <tt class="docutils literal"><span class="pre">dt.tzinfo</span></tt> is <em>self</em>, and <em>dt</em>&#8216;s
date and time data are to be viewed as expressing a UTC time.  The purpose
of <a class="reference internal" href="#datetime.tzinfo.fromutc" title="datetime.tzinfo.fromutc"><tt class="xref py py-meth docutils literal"><span class="pre">fromutc()</span></tt></a> is to adjust the date and time data, returning an
equivalent datetime in <em>self</em>&#8216;s local time.</p>
<p>Most <a class="reference internal" href="#datetime.tzinfo" title="datetime.tzinfo"><tt class="xref py py-class docutils literal"><span class="pre">tzinfo</span></tt></a> subclasses should be able to inherit the default
<a class="reference internal" href="#datetime.tzinfo.fromutc" title="datetime.tzinfo.fromutc"><tt class="xref py py-meth docutils literal"><span class="pre">fromutc()</span></tt></a> implementation without problems.  It&#8217;s strong enough to handle
fixed-offset time zones, and time zones accounting for both standard and
daylight time, and the latter even if the DST transition times differ in
different years.  An example of a time zone the default <a class="reference internal" href="#datetime.tzinfo.fromutc" title="datetime.tzinfo.fromutc"><tt class="xref py py-meth docutils literal"><span class="pre">fromutc()</span></tt></a>
implementation may not handle correctly in all cases is one where the standard
offset (from UTC) depends on the specific date and time passed, which can happen
for political reasons. The default implementations of <tt class="xref py py-meth docutils literal"><span class="pre">astimezone()</span></tt> and
<a class="reference internal" href="#datetime.tzinfo.fromutc" title="datetime.tzinfo.fromutc"><tt class="xref py py-meth docutils literal"><span class="pre">fromutc()</span></tt></a> may not produce the result you want if the result is one of the
hours straddling the moment the standard offset changes.</p>
<p>Skipping code for error cases, the default <a class="reference internal" href="#datetime.tzinfo.fromutc" title="datetime.tzinfo.fromutc"><tt class="xref py py-meth docutils literal"><span class="pre">fromutc()</span></tt></a> implementation acts
like:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="k">def</span> <span class="nf">fromutc</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">dt</span><span class="p">):</span>
    <span class="c"># raise ValueError error if dt.tzinfo is not self</span>
    <span class="n">dtoff</span> <span class="o">=</span> <span class="n">dt</span><span class="o">.</span><span class="n">utcoffset</span><span class="p">()</span>
    <span class="n">dtdst</span> <span class="o">=</span> <span class="n">dt</span><span class="o">.</span><span class="n">dst</span><span class="p">()</span>
    <span class="c"># raise ValueError if dtoff is None or dtdst is None</span>
    <span class="n">delta</span> <span class="o">=</span> <span class="n">dtoff</span> <span class="o">-</span> <span class="n">dtdst</span>  <span class="c"># this is self&#39;s standard offset</span>
    <span class="k">if</span> <span class="n">delta</span><span class="p">:</span>
        <span class="n">dt</span> <span class="o">+=</span> <span class="n">delta</span>   <span class="c"># convert to standard local time</span>
        <span class="n">dtdst</span> <span class="o">=</span> <span class="n">dt</span><span class="o">.</span><span class="n">dst</span><span class="p">()</span>
        <span class="c"># raise ValueError if dtdst is None</span>
    <span class="k">if</span> <span class="n">dtdst</span><span class="p">:</span>
        <span class="k">return</span> <span class="n">dt</span> <span class="o">+</span> <span class="n">dtdst</span>
    <span class="k">else</span><span class="p">:</span>
        <span class="k">return</span> <span class="n">dt</span>
</pre></div>
</div>
</dd></dl>

<p>Example <a class="reference internal" href="#datetime.tzinfo" title="datetime.tzinfo"><tt class="xref py py-class docutils literal"><span class="pre">tzinfo</span></tt></a> classes:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="kn">from</span> <span class="nn">datetime</span> <span class="kn">import</span> <span class="n">tzinfo</span><span class="p">,</span> <span class="n">timedelta</span><span class="p">,</span> <span class="n">datetime</span>

<span class="n">ZERO</span> <span class="o">=</span> <span class="n">timedelta</span><span class="p">(</span><span class="mi">0</span><span class="p">)</span>
<span class="n">HOUR</span> <span class="o">=</span> <span class="n">timedelta</span><span class="p">(</span><span class="n">hours</span><span class="o">=</span><span class="mi">1</span><span class="p">)</span>

<span class="c"># A UTC class.</span>

<span class="k">class</span> <span class="nc">UTC</span><span class="p">(</span><span class="n">tzinfo</span><span class="p">):</span>
    <span class="sd">&quot;&quot;&quot;UTC&quot;&quot;&quot;</span>

    <span class="k">def</span> <span class="nf">utcoffset</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">dt</span><span class="p">):</span>
        <span class="k">return</span> <span class="n">ZERO</span>

    <span class="k">def</span> <span class="nf">tzname</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">dt</span><span class="p">):</span>
        <span class="k">return</span> <span class="s">&quot;UTC&quot;</span>

    <span class="k">def</span> <span class="nf">dst</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">dt</span><span class="p">):</span>
        <span class="k">return</span> <span class="n">ZERO</span>

<span class="n">utc</span> <span class="o">=</span> <span class="n">UTC</span><span class="p">()</span>

<span class="c"># A class building tzinfo objects for fixed-offset time zones.</span>
<span class="c"># Note that FixedOffset(0, &quot;UTC&quot;) is a different way to build a</span>
<span class="c"># UTC tzinfo object.</span>

<span class="k">class</span> <span class="nc">FixedOffset</span><span class="p">(</span><span class="n">tzinfo</span><span class="p">):</span>
    <span class="sd">&quot;&quot;&quot;Fixed offset in minutes east from UTC.&quot;&quot;&quot;</span>

    <span class="k">def</span> <span class="nf">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">offset</span><span class="p">,</span> <span class="n">name</span><span class="p">):</span>
        <span class="bp">self</span><span class="o">.</span><span class="n">__offset</span> <span class="o">=</span> <span class="n">timedelta</span><span class="p">(</span><span class="n">minutes</span> <span class="o">=</span> <span class="n">offset</span><span class="p">)</span>
        <span class="bp">self</span><span class="o">.</span><span class="n">__name</span> <span class="o">=</span> <span class="n">name</span>

    <span class="k">def</span> <span class="nf">utcoffset</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">dt</span><span class="p">):</span>
        <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">__offset</span>

    <span class="k">def</span> <span class="nf">tzname</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">dt</span><span class="p">):</span>
        <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">__name</span>

    <span class="k">def</span> <span class="nf">dst</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">dt</span><span class="p">):</span>
        <span class="k">return</span> <span class="n">ZERO</span>

<span class="c"># A class capturing the platform&#39;s idea of local time.</span>

<span class="kn">import</span> <span class="nn">time</span> <span class="kn">as</span> <span class="nn">_time</span>

<span class="n">STDOFFSET</span> <span class="o">=</span> <span class="n">timedelta</span><span class="p">(</span><span class="n">seconds</span> <span class="o">=</span> <span class="o">-</span><span class="n">_time</span><span class="o">.</span><span class="n">timezone</span><span class="p">)</span>
<span class="k">if</span> <span class="n">_time</span><span class="o">.</span><span class="n">daylight</span><span class="p">:</span>
    <span class="n">DSTOFFSET</span> <span class="o">=</span> <span class="n">timedelta</span><span class="p">(</span><span class="n">seconds</span> <span class="o">=</span> <span class="o">-</span><span class="n">_time</span><span class="o">.</span><span class="n">altzone</span><span class="p">)</span>
<span class="k">else</span><span class="p">:</span>
    <span class="n">DSTOFFSET</span> <span class="o">=</span> <span class="n">STDOFFSET</span>

<span class="n">DSTDIFF</span> <span class="o">=</span> <span class="n">DSTOFFSET</span> <span class="o">-</span> <span class="n">STDOFFSET</span>

<span class="k">class</span> <span class="nc">LocalTimezone</span><span class="p">(</span><span class="n">tzinfo</span><span class="p">):</span>

    <span class="k">def</span> <span class="nf">utcoffset</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">dt</span><span class="p">):</span>
        <span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">_isdst</span><span class="p">(</span><span class="n">dt</span><span class="p">):</span>
            <span class="k">return</span> <span class="n">DSTOFFSET</span>
        <span class="k">else</span><span class="p">:</span>
            <span class="k">return</span> <span class="n">STDOFFSET</span>

    <span class="k">def</span> <span class="nf">dst</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">dt</span><span class="p">):</span>
        <span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">_isdst</span><span class="p">(</span><span class="n">dt</span><span class="p">):</span>
            <span class="k">return</span> <span class="n">DSTDIFF</span>
        <span class="k">else</span><span class="p">:</span>
            <span class="k">return</span> <span class="n">ZERO</span>

    <span class="k">def</span> <span class="nf">tzname</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">dt</span><span class="p">):</span>
        <span class="k">return</span> <span class="n">_time</span><span class="o">.</span><span class="n">tzname</span><span class="p">[</span><span class="bp">self</span><span class="o">.</span><span class="n">_isdst</span><span class="p">(</span><span class="n">dt</span><span class="p">)]</span>

    <span class="k">def</span> <span class="nf">_isdst</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">dt</span><span class="p">):</span>
        <span class="n">tt</span> <span class="o">=</span> <span class="p">(</span><span class="n">dt</span><span class="o">.</span><span class="n">year</span><span class="p">,</span> <span class="n">dt</span><span class="o">.</span><span class="n">month</span><span class="p">,</span> <span class="n">dt</span><span class="o">.</span><span class="n">day</span><span class="p">,</span>
              <span class="n">dt</span><span class="o">.</span><span class="n">hour</span><span class="p">,</span> <span class="n">dt</span><span class="o">.</span><span class="n">minute</span><span class="p">,</span> <span class="n">dt</span><span class="o">.</span><span class="n">second</span><span class="p">,</span>
              <span class="n">dt</span><span class="o">.</span><span class="n">weekday</span><span class="p">(),</span> <span class="mi">0</span><span class="p">,</span> <span class="mi">0</span><span class="p">)</span>
        <span class="n">stamp</span> <span class="o">=</span> <span class="n">_time</span><span class="o">.</span><span class="n">mktime</span><span class="p">(</span><span class="n">tt</span><span class="p">)</span>
        <span class="n">tt</span> <span class="o">=</span> <span class="n">_time</span><span class="o">.</span><span class="n">localtime</span><span class="p">(</span><span class="n">stamp</span><span class="p">)</span>
        <span class="k">return</span> <span class="n">tt</span><span class="o">.</span><span class="n">tm_isdst</span> <span class="o">&gt;</span> <span class="mi">0</span>

<span class="n">Local</span> <span class="o">=</span> <span class="n">LocalTimezone</span><span class="p">()</span>


<span class="c"># A complete implementation of current DST rules for major US time zones.</span>

<span class="k">def</span> <span class="nf">first_sunday_on_or_after</span><span class="p">(</span><span class="n">dt</span><span class="p">):</span>
    <span class="n">days_to_go</span> <span class="o">=</span> <span class="mi">6</span> <span class="o">-</span> <span class="n">dt</span><span class="o">.</span><span class="n">weekday</span><span class="p">()</span>
    <span class="k">if</span> <span class="n">days_to_go</span><span class="p">:</span>
        <span class="n">dt</span> <span class="o">+=</span> <span class="n">timedelta</span><span class="p">(</span><span class="n">days_to_go</span><span class="p">)</span>
    <span class="k">return</span> <span class="n">dt</span>


<span class="c"># US DST Rules</span>
<span class="c">#</span>
<span class="c"># This is a simplified (i.e., wrong for a few cases) set of rules for US</span>
<span class="c"># DST start and end times. For a complete and up-to-date set of DST rules</span>
<span class="c"># and timezone definitions, visit the Olson Database (or try pytz):</span>
<span class="c"># http://www.twinsun.com/tz/tz-link.htm</span>
<span class="c"># http://sourceforge.net/projects/pytz/ (might not be up-to-date)</span>
<span class="c">#</span>
<span class="c"># In the US, since 2007, DST starts at 2am (standard time) on the second</span>
<span class="c"># Sunday in March, which is the first Sunday on or after Mar 8.</span>
<span class="n">DSTSTART_2007</span> <span class="o">=</span> <span class="n">datetime</span><span class="p">(</span><span class="mi">1</span><span class="p">,</span> <span class="mi">3</span><span class="p">,</span> <span class="mi">8</span><span class="p">,</span> <span class="mi">2</span><span class="p">)</span>
<span class="c"># and ends at 2am (DST time; 1am standard time) on the first Sunday of Nov.</span>
<span class="n">DSTEND_2007</span> <span class="o">=</span> <span class="n">datetime</span><span class="p">(</span><span class="mi">1</span><span class="p">,</span> <span class="mi">11</span><span class="p">,</span> <span class="mi">1</span><span class="p">,</span> <span class="mi">1</span><span class="p">)</span>
<span class="c"># From 1987 to 2006, DST used to start at 2am (standard time) on the first</span>
<span class="c"># Sunday in April and to end at 2am (DST time; 1am standard time) on the last</span>
<span class="c"># Sunday of October, which is the first Sunday on or after Oct 25.</span>
<span class="n">DSTSTART_1987_2006</span> <span class="o">=</span> <span class="n">datetime</span><span class="p">(</span><span class="mi">1</span><span class="p">,</span> <span class="mi">4</span><span class="p">,</span> <span class="mi">1</span><span class="p">,</span> <span class="mi">2</span><span class="p">)</span>
<span class="n">DSTEND_1987_2006</span> <span class="o">=</span> <span class="n">datetime</span><span class="p">(</span><span class="mi">1</span><span class="p">,</span> <span class="mi">10</span><span class="p">,</span> <span class="mi">25</span><span class="p">,</span> <span class="mi">1</span><span class="p">)</span>
<span class="c"># From 1967 to 1986, DST used to start at 2am (standard time) on the last</span>
<span class="c"># Sunday in April (the one on or after April 24) and to end at 2am (DST time;</span>
<span class="c"># 1am standard time) on the last Sunday of October, which is the first Sunday</span>
<span class="c"># on or after Oct 25.</span>
<span class="n">DSTSTART_1967_1986</span> <span class="o">=</span> <span class="n">datetime</span><span class="p">(</span><span class="mi">1</span><span class="p">,</span> <span class="mi">4</span><span class="p">,</span> <span class="mi">24</span><span class="p">,</span> <span class="mi">2</span><span class="p">)</span>
<span class="n">DSTEND_1967_1986</span> <span class="o">=</span> <span class="n">DSTEND_1987_2006</span>

<span class="k">class</span> <span class="nc">USTimeZone</span><span class="p">(</span><span class="n">tzinfo</span><span class="p">):</span>

    <span class="k">def</span> <span class="nf">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">hours</span><span class="p">,</span> <span class="n">reprname</span><span class="p">,</span> <span class="n">stdname</span><span class="p">,</span> <span class="n">dstname</span><span class="p">):</span>
        <span class="bp">self</span><span class="o">.</span><span class="n">stdoffset</span> <span class="o">=</span> <span class="n">timedelta</span><span class="p">(</span><span class="n">hours</span><span class="o">=</span><span class="n">hours</span><span class="p">)</span>
        <span class="bp">self</span><span class="o">.</span><span class="n">reprname</span> <span class="o">=</span> <span class="n">reprname</span>
        <span class="bp">self</span><span class="o">.</span><span class="n">stdname</span> <span class="o">=</span> <span class="n">stdname</span>
        <span class="bp">self</span><span class="o">.</span><span class="n">dstname</span> <span class="o">=</span> <span class="n">dstname</span>

    <span class="k">def</span> <span class="nf">__repr__</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
        <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">reprname</span>

    <span class="k">def</span> <span class="nf">tzname</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">dt</span><span class="p">):</span>
        <span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">dst</span><span class="p">(</span><span class="n">dt</span><span class="p">):</span>
            <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">dstname</span>
        <span class="k">else</span><span class="p">:</span>
            <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">stdname</span>

    <span class="k">def</span> <span class="nf">utcoffset</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">dt</span><span class="p">):</span>
        <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">stdoffset</span> <span class="o">+</span> <span class="bp">self</span><span class="o">.</span><span class="n">dst</span><span class="p">(</span><span class="n">dt</span><span class="p">)</span>

    <span class="k">def</span> <span class="nf">dst</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">dt</span><span class="p">):</span>
        <span class="k">if</span> <span class="n">dt</span> <span class="ow">is</span> <span class="bp">None</span> <span class="ow">or</span> <span class="n">dt</span><span class="o">.</span><span class="n">tzinfo</span> <span class="ow">is</span> <span class="bp">None</span><span class="p">:</span>
            <span class="c"># An exception may be sensible here, in one or both cases.</span>
            <span class="c"># It depends on how you want to treat them.  The default</span>
            <span class="c"># fromutc() implementation (called by the default astimezone()</span>
            <span class="c"># implementation) passes a datetime with dt.tzinfo is self.</span>
            <span class="k">return</span> <span class="n">ZERO</span>
        <span class="k">assert</span> <span class="n">dt</span><span class="o">.</span><span class="n">tzinfo</span> <span class="ow">is</span> <span class="bp">self</span>

        <span class="c"># Find start and end times for US DST. For years before 1967, return</span>
        <span class="c"># ZERO for no DST.</span>
        <span class="k">if</span> <span class="mi">2006</span> <span class="o">&lt;</span> <span class="n">dt</span><span class="o">.</span><span class="n">year</span><span class="p">:</span>
            <span class="n">dststart</span><span class="p">,</span> <span class="n">dstend</span> <span class="o">=</span> <span class="n">DSTSTART_2007</span><span class="p">,</span> <span class="n">DSTEND_2007</span>
        <span class="k">elif</span> <span class="mi">1986</span> <span class="o">&lt;</span> <span class="n">dt</span><span class="o">.</span><span class="n">year</span> <span class="o">&lt;</span> <span class="mi">2007</span><span class="p">:</span>
            <span class="n">dststart</span><span class="p">,</span> <span class="n">dstend</span> <span class="o">=</span> <span class="n">DSTSTART_1987_2006</span><span class="p">,</span> <span class="n">DSTEND_1987_2006</span>
        <span class="k">elif</span> <span class="mi">1966</span> <span class="o">&lt;</span> <span class="n">dt</span><span class="o">.</span><span class="n">year</span> <span class="o">&lt;</span> <span class="mi">1987</span><span class="p">:</span>
            <span class="n">dststart</span><span class="p">,</span> <span class="n">dstend</span> <span class="o">=</span> <span class="n">DSTSTART_1967_1986</span><span class="p">,</span> <span class="n">DSTEND_1967_1986</span>
        <span class="k">else</span><span class="p">:</span>
            <span class="k">return</span> <span class="n">ZERO</span>

        <span class="n">start</span> <span class="o">=</span> <span class="n">first_sunday_on_or_after</span><span class="p">(</span><span class="n">dststart</span><span class="o">.</span><span class="n">replace</span><span class="p">(</span><span class="n">year</span><span class="o">=</span><span class="n">dt</span><span class="o">.</span><span class="n">year</span><span class="p">))</span>
        <span class="n">end</span> <span class="o">=</span> <span class="n">first_sunday_on_or_after</span><span class="p">(</span><span class="n">dstend</span><span class="o">.</span><span class="n">replace</span><span class="p">(</span><span class="n">year</span><span class="o">=</span><span class="n">dt</span><span class="o">.</span><span class="n">year</span><span class="p">))</span>

        <span class="c"># Can&#39;t compare naive to aware objects, so strip the timezone from</span>
        <span class="c"># dt first.</span>
        <span class="k">if</span> <span class="n">start</span> <span class="o">&lt;=</span> <span class="n">dt</span><span class="o">.</span><span class="n">replace</span><span class="p">(</span><span class="n">tzinfo</span><span class="o">=</span><span class="bp">None</span><span class="p">)</span> <span class="o">&lt;</span> <span class="n">end</span><span class="p">:</span>
            <span class="k">return</span> <span class="n">HOUR</span>
        <span class="k">else</span><span class="p">:</span>
            <span class="k">return</span> <span class="n">ZERO</span>

<span class="n">Eastern</span>  <span class="o">=</span> <span class="n">USTimeZone</span><span class="p">(</span><span class="o">-</span><span class="mi">5</span><span class="p">,</span> <span class="s">&quot;Eastern&quot;</span><span class="p">,</span>  <span class="s">&quot;EST&quot;</span><span class="p">,</span> <span class="s">&quot;EDT&quot;</span><span class="p">)</span>
<span class="n">Central</span>  <span class="o">=</span> <span class="n">USTimeZone</span><span class="p">(</span><span class="o">-</span><span class="mi">6</span><span class="p">,</span> <span class="s">&quot;Central&quot;</span><span class="p">,</span>  <span class="s">&quot;CST&quot;</span><span class="p">,</span> <span class="s">&quot;CDT&quot;</span><span class="p">)</span>
<span class="n">Mountain</span> <span class="o">=</span> <span class="n">USTimeZone</span><span class="p">(</span><span class="o">-</span><span class="mi">7</span><span class="p">,</span> <span class="s">&quot;Mountain&quot;</span><span class="p">,</span> <span class="s">&quot;MST&quot;</span><span class="p">,</span> <span class="s">&quot;MDT&quot;</span><span class="p">)</span>
<span class="n">Pacific</span>  <span class="o">=</span> <span class="n">USTimeZone</span><span class="p">(</span><span class="o">-</span><span class="mi">8</span><span class="p">,</span> <span class="s">&quot;Pacific&quot;</span><span class="p">,</span>  <span class="s">&quot;PST&quot;</span><span class="p">,</span> <span class="s">&quot;PDT&quot;</span><span class="p">)</span>
</pre></div>
</div>
<p>Note that there are unavoidable subtleties twice per year in a <a class="reference internal" href="#datetime.tzinfo" title="datetime.tzinfo"><tt class="xref py py-class docutils literal"><span class="pre">tzinfo</span></tt></a>
subclass accounting for both standard and daylight time, at the DST transition
points.  For concreteness, consider US Eastern (UTC -0500), where EDT begins the
minute after 1:59 (EST) on the second Sunday in March, and ends the minute after
1:59 (EDT) on the first Sunday in November:</p>
<div class="highlight-python"><pre>  UTC   3:MM  4:MM  5:MM  6:MM  7:MM  8:MM
  EST  22:MM 23:MM  0:MM  1:MM  2:MM  3:MM
  EDT  23:MM  0:MM  1:MM  2:MM  3:MM  4:MM

start  22:MM 23:MM  0:MM  1:MM  3:MM  4:MM

  end  23:MM  0:MM  1:MM  1:MM  2:MM  3:MM</pre>
</div>
<p>When DST starts (the &#8220;start&#8221; line), the local wall clock leaps from 1:59 to
3:00.  A wall time of the form 2:MM doesn&#8217;t really make sense on that day, so
<tt class="docutils literal"><span class="pre">astimezone(Eastern)</span></tt> won&#8217;t deliver a result with <tt class="docutils literal"><span class="pre">hour</span> <span class="pre">==</span> <span class="pre">2</span></tt> on the day DST
begins.  In order for <tt class="xref py py-meth docutils literal"><span class="pre">astimezone()</span></tt> to make this guarantee, the
<tt class="xref py py-meth docutils literal"><span class="pre">rzinfo.dst()</span></tt> method must consider times in the &#8220;missing hour&#8221; (2:MM for
Eastern) to be in daylight time.</p>
<p>When DST ends (the &#8220;end&#8221; line), there&#8217;s a potentially worse problem: there&#8217;s an
hour that can&#8217;t be spelled unambiguously in local wall time: the last hour of
daylight time.  In Eastern, that&#8217;s times of the form 5:MM UTC on the day
daylight time ends.  The local wall clock leaps from 1:59 (daylight time) back
to 1:00 (standard time) again. Local times of the form 1:MM are ambiguous.
<tt class="xref py py-meth docutils literal"><span class="pre">astimezone()</span></tt> mimics the local clock&#8217;s behavior by mapping two adjacent UTC
hours into the same local hour then.  In the Eastern example, UTC times of the
form 5:MM and 6:MM both map to 1:MM when converted to Eastern.  In order for
<tt class="xref py py-meth docutils literal"><span class="pre">astimezone()</span></tt> to make this guarantee, the <a class="reference internal" href="#datetime.tzinfo.dst" title="datetime.tzinfo.dst"><tt class="xref py py-meth docutils literal"><span class="pre">tzinfo.dst()</span></tt></a> method must
consider times in the &#8220;repeated hour&#8221; to be in standard time.  This is easily
arranged, as in the example, by expressing DST switch times in the time zone&#8217;s
standard local time.</p>
<p>Applications that can&#8217;t bear such ambiguities should avoid using hybrid
<a class="reference internal" href="#datetime.tzinfo" title="datetime.tzinfo"><tt class="xref py py-class docutils literal"><span class="pre">tzinfo</span></tt></a> subclasses; there are no ambiguities when using UTC, or any
other fixed-offset <a class="reference internal" href="#datetime.tzinfo" title="datetime.tzinfo"><tt class="xref py py-class docutils literal"><span class="pre">tzinfo</span></tt></a> subclass (such as a class representing only
EST (fixed offset -5 hours), or only EDT (fixed offset -4 hours)).</p>
<div class="admonition-see-also admonition seealso">
<p class="first admonition-title">See also</p>
<dl class="last docutils">
<dt><a class="reference external" href="http://pypi.python.org/pypi/pytz/">pytz</a></dt>
<dd><p class="first">The standard library has no <a class="reference internal" href="#datetime.tzinfo" title="datetime.tzinfo"><tt class="xref py py-class docutils literal"><span class="pre">tzinfo</span></tt></a> instances, but
there exists a third-party library which brings the <em>IANA timezone
database</em> (also known as the Olson database) to Python: <em>pytz</em>.</p>
<p class="last"><em>pytz</em> contains up-to-date information and its usage is recommended.</p>
</dd>
<dt><a class="reference external" href="http://www.iana.org/time-zones">IANA timezone database</a></dt>
<dd>The Time Zone Database (often called tz or zoneinfo) contains code and
data that represent the history of local time for many representative
locations around the globe. It is updated periodically to reflect changes
made by political bodies to time zone boundaries, UTC offsets, and
daylight-saving rules.</dd>
</dl>
</div>
</div>
<div class="section" id="strftime-and-strptime-behavior">
<span id="strftime-strptime-behavior"></span><h2>8.1.7. <tt class="xref py py-meth docutils literal"><span class="pre">strftime()</span></tt> and <tt class="xref py py-meth docutils literal"><span class="pre">strptime()</span></tt> Behavior<a class="headerlink" href="#strftime-and-strptime-behavior" title="Permalink to this headline">¶</a></h2>
<p><a class="reference internal" href="#datetime.date" title="datetime.date"><tt class="xref py py-class docutils literal"><span class="pre">date</span></tt></a>, <a class="reference internal" href="#datetime.datetime" title="datetime.datetime"><tt class="xref py py-class docutils literal"><span class="pre">datetime</span></tt></a>, and <a class="reference internal" href="#datetime.time" title="datetime.time"><tt class="xref py py-class docutils literal"><span class="pre">time</span></tt></a> objects all support a
<tt class="docutils literal"><span class="pre">strftime(format)</span></tt> method, to create a string representing the time under the
control of an explicit format string.  Broadly speaking, <tt class="docutils literal"><span class="pre">d.strftime(fmt)</span></tt>
acts like the <a class="reference internal" href="time.html#module-time" title="time: Time access and conversions."><tt class="xref py py-mod docutils literal"><span class="pre">time</span></tt></a> module&#8217;s <tt class="docutils literal"><span class="pre">time.strftime(fmt,</span> <span class="pre">d.timetuple())</span></tt>
although not all objects support a <tt class="xref py py-meth docutils literal"><span class="pre">timetuple()</span></tt> method.</p>
<p>Conversely, the <a class="reference internal" href="#datetime.datetime.strptime" title="datetime.datetime.strptime"><tt class="xref py py-meth docutils literal"><span class="pre">datetime.strptime()</span></tt></a> class method creates a
<a class="reference internal" href="#datetime.datetime" title="datetime.datetime"><tt class="xref py py-class docutils literal"><span class="pre">datetime</span></tt></a> object from a string representing a date and time and a
corresponding format string. <tt class="docutils literal"><span class="pre">datetime.strptime(date_string,</span> <span class="pre">format)</span></tt> is
equivalent to <tt class="docutils literal"><span class="pre">datetime(*(time.strptime(date_string,</span> <span class="pre">format)[0:6]))</span></tt>.</p>
<p>For <a class="reference internal" href="#datetime.time" title="datetime.time"><tt class="xref py py-class docutils literal"><span class="pre">time</span></tt></a> objects, the format codes for year, month, and day should not
be used, as time objects have no such values.  If they&#8217;re used anyway, <tt class="docutils literal"><span class="pre">1900</span></tt>
is substituted for the year, and <tt class="docutils literal"><span class="pre">1</span></tt> for the month and day.</p>
<p>For <a class="reference internal" href="#datetime.date" title="datetime.date"><tt class="xref py py-class docutils literal"><span class="pre">date</span></tt></a> objects, the format codes for hours, minutes, seconds, and
microseconds should not be used, as <a class="reference internal" href="#datetime.date" title="datetime.date"><tt class="xref py py-class docutils literal"><span class="pre">date</span></tt></a> objects have no such
values.  If they&#8217;re used anyway, <tt class="docutils literal"><span class="pre">0</span></tt> is substituted for them.</p>
<p class="versionadded">
<span class="versionmodified">New in version 2.6: </span><a class="reference internal" href="#datetime.time" title="datetime.time"><tt class="xref py py-class docutils literal"><span class="pre">time</span></tt></a> and <a class="reference internal" href="#datetime.datetime" title="datetime.datetime"><tt class="xref py py-class docutils literal"><span class="pre">datetime</span></tt></a> objects support a <tt class="docutils literal"><span class="pre">%f</span></tt> format code
which expands to the number of microseconds in the object, zero-padded on
the left to six places.</p>
<p>For a naive object, the <tt class="docutils literal"><span class="pre">%z</span></tt> and <tt class="docutils literal"><span class="pre">%Z</span></tt> format codes are replaced by empty
strings.</p>
<p>For an aware object:</p>
<dl class="docutils">
<dt><tt class="docutils literal"><span class="pre">%z</span></tt></dt>
<dd><tt class="xref py py-meth docutils literal"><span class="pre">utcoffset()</span></tt> is transformed into a 5-character string of the form +HHMM or
-HHMM, where HH is a 2-digit string giving the number of UTC offset hours, and
MM is a 2-digit string giving the number of UTC offset minutes.  For example, if
<tt class="xref py py-meth docutils literal"><span class="pre">utcoffset()</span></tt> returns <tt class="docutils literal"><span class="pre">timedelta(hours=-3,</span> <span class="pre">minutes=-30)</span></tt>, <tt class="docutils literal"><span class="pre">%z</span></tt> is
replaced with the string <tt class="docutils literal"><span class="pre">'-0330'</span></tt>.</dd>
<dt><tt class="docutils literal"><span class="pre">%Z</span></tt></dt>
<dd>If <tt class="xref py py-meth docutils literal"><span class="pre">tzname()</span></tt> returns <tt class="docutils literal"><span class="pre">None</span></tt>, <tt class="docutils literal"><span class="pre">%Z</span></tt> is replaced by an empty string.
Otherwise <tt class="docutils literal"><span class="pre">%Z</span></tt> is replaced by the returned value, which must be a string.</dd>
</dl>
<p>The full set of format codes supported varies across platforms, because Python
calls the platform C library&#8217;s <tt class="xref py py-func docutils literal"><span class="pre">strftime()</span></tt> function, and platform
variations are common.</p>
<p>The following is a list of all the format codes that the C standard (1989
version) requires, and these work on all platforms with a standard C
implementation.  Note that the 1999 version of the C standard added additional
format codes.</p>
<p>The exact range of years for which <tt class="xref py py-meth docutils literal"><span class="pre">strftime()</span></tt> works also varies across
platforms.  Regardless of platform, years before 1900 cannot be used.</p>
<table border="1" class="docutils">
<colgroup>
<col width="22%" />
<col width="64%" />
<col width="14%" />
</colgroup>
<thead valign="bottom">
<tr class="row-odd"><th class="head">Directive</th>
<th class="head">Meaning</th>
<th class="head">Notes</th>
</tr>
</thead>
<tbody valign="top">
<tr class="row-even"><td><tt class="docutils literal"><span class="pre">%a</span></tt></td>
<td>Locale&#8217;s abbreviated weekday
name.</td>
<td>&nbsp;</td>
</tr>
<tr class="row-odd"><td><tt class="docutils literal"><span class="pre">%A</span></tt></td>
<td>Locale&#8217;s full weekday name.</td>
<td>&nbsp;</td>
</tr>
<tr class="row-even"><td><tt class="docutils literal"><span class="pre">%b</span></tt></td>
<td>Locale&#8217;s abbreviated month
name.</td>
<td>&nbsp;</td>
</tr>
<tr class="row-odd"><td><tt class="docutils literal"><span class="pre">%B</span></tt></td>
<td>Locale&#8217;s full month name.</td>
<td>&nbsp;</td>
</tr>
<tr class="row-even"><td><tt class="docutils literal"><span class="pre">%c</span></tt></td>
<td>Locale&#8217;s appropriate date and
time representation.</td>
<td>&nbsp;</td>
</tr>
<tr class="row-odd"><td><tt class="docutils literal"><span class="pre">%d</span></tt></td>
<td>Day of the month as a decimal
number [01,31].</td>
<td>&nbsp;</td>
</tr>
<tr class="row-even"><td><tt class="docutils literal"><span class="pre">%f</span></tt></td>
<td>Microsecond as a decimal
number [0,999999], zero-padded
on the left</td>
<td>(1)</td>
</tr>
<tr class="row-odd"><td><tt class="docutils literal"><span class="pre">%H</span></tt></td>
<td>Hour (24-hour clock) as a
decimal number [00,23].</td>
<td>&nbsp;</td>
</tr>
<tr class="row-even"><td><tt class="docutils literal"><span class="pre">%I</span></tt></td>
<td>Hour (12-hour clock) as a
decimal number [01,12].</td>
<td>&nbsp;</td>
</tr>
<tr class="row-odd"><td><tt class="docutils literal"><span class="pre">%j</span></tt></td>
<td>Day of the year as a decimal
number [001,366].</td>
<td>&nbsp;</td>
</tr>
<tr class="row-even"><td><tt class="docutils literal"><span class="pre">%m</span></tt></td>
<td>Month as a decimal number
[01,12].</td>
<td>&nbsp;</td>
</tr>
<tr class="row-odd"><td><tt class="docutils literal"><span class="pre">%M</span></tt></td>
<td>Minute as a decimal number
[00,59].</td>
<td>&nbsp;</td>
</tr>
<tr class="row-even"><td><tt class="docutils literal"><span class="pre">%p</span></tt></td>
<td>Locale&#8217;s equivalent of either
AM or PM.</td>
<td>(2)</td>
</tr>
<tr class="row-odd"><td><tt class="docutils literal"><span class="pre">%S</span></tt></td>
<td>Second as a decimal number
[00,61].</td>
<td>(3)</td>
</tr>
<tr class="row-even"><td><tt class="docutils literal"><span class="pre">%U</span></tt></td>
<td>Week number of the year
(Sunday as the first day of
the week) as a decimal number
[00,53].  All days in a new
year preceding the first
Sunday are considered to be in
week 0.</td>
<td>(4)</td>
</tr>
<tr class="row-odd"><td><tt class="docutils literal"><span class="pre">%w</span></tt></td>
<td>Weekday as a decimal number
[0(Sunday),6].</td>
<td>&nbsp;</td>
</tr>
<tr class="row-even"><td><tt class="docutils literal"><span class="pre">%W</span></tt></td>
<td>Week number of the year
(Monday as the first day of
the week) as a decimal number
[00,53].  All days in a new
year preceding the first
Monday are considered to be in
week 0.</td>
<td>(4)</td>
</tr>
<tr class="row-odd"><td><tt class="docutils literal"><span class="pre">%x</span></tt></td>
<td>Locale&#8217;s appropriate date
representation.</td>
<td>&nbsp;</td>
</tr>
<tr class="row-even"><td><tt class="docutils literal"><span class="pre">%X</span></tt></td>
<td>Locale&#8217;s appropriate time
representation.</td>
<td>&nbsp;</td>
</tr>
<tr class="row-odd"><td><tt class="docutils literal"><span class="pre">%y</span></tt></td>
<td>Year without century as a
decimal number [00,99].</td>
<td>&nbsp;</td>
</tr>
<tr class="row-even"><td><tt class="docutils literal"><span class="pre">%Y</span></tt></td>
<td>Year with century as a decimal
number.</td>
<td>&nbsp;</td>
</tr>
<tr class="row-odd"><td><tt class="docutils literal"><span class="pre">%z</span></tt></td>
<td>UTC offset in the form +HHMM
or -HHMM (empty string if the
the object is naive).</td>
<td>(5)</td>
</tr>
<tr class="row-even"><td><tt class="docutils literal"><span class="pre">%Z</span></tt></td>
<td>Time zone name (empty string
if the object is naive).</td>
<td>&nbsp;</td>
</tr>
<tr class="row-odd"><td><tt class="docutils literal"><span class="pre">%%</span></tt></td>
<td>A literal <tt class="docutils literal"><span class="pre">'%'</span></tt> character.</td>
<td>&nbsp;</td>
</tr>
</tbody>
</table>
<p>Notes:</p>
<ol class="arabic simple">
<li>When used with the <tt class="xref py py-meth docutils literal"><span class="pre">strptime()</span></tt> method, the <tt class="docutils literal"><span class="pre">%f</span></tt> directive
accepts from one to six digits and zero pads on the right.  <tt class="docutils literal"><span class="pre">%f</span></tt> is
an extension to the set of format characters in the C standard (but
implemented separately in datetime objects, and therefore always
available).</li>
<li>When used with the <tt class="xref py py-meth docutils literal"><span class="pre">strptime()</span></tt> method, the <tt class="docutils literal"><span class="pre">%p</span></tt> directive only affects
the output hour field if the <tt class="docutils literal"><span class="pre">%I</span></tt> directive is used to parse the hour.</li>
<li>The range really is <tt class="docutils literal"><span class="pre">0</span></tt> to <tt class="docutils literal"><span class="pre">61</span></tt>; according to the Posix standard this
accounts for leap seconds and the (very rare) double leap seconds.
The <a class="reference internal" href="time.html#module-time" title="time: Time access and conversions."><tt class="xref py py-mod docutils literal"><span class="pre">time</span></tt></a> module may produce and does accept leap seconds since
it is based on the Posix standard, but the <a class="reference internal" href="#module-datetime" title="datetime: Basic date and time types."><tt class="xref py py-mod docutils literal"><span class="pre">datetime</span></tt></a> module
does not accept leap seconds in <tt class="xref py py-meth docutils literal"><span class="pre">strptime()</span></tt> input nor will it
produce them in <tt class="xref py py-func docutils literal"><span class="pre">strftime()</span></tt> output.</li>
<li>When used with the <tt class="xref py py-meth docutils literal"><span class="pre">strptime()</span></tt> method, <tt class="docutils literal"><span class="pre">%U</span></tt> and <tt class="docutils literal"><span class="pre">%W</span></tt> are only used in
calculations when the day of the week and the year are specified.</li>
<li>For example, if <tt class="xref py py-meth docutils literal"><span class="pre">utcoffset()</span></tt> returns <tt class="docutils literal"><span class="pre">timedelta(hours=-3,</span> <span class="pre">minutes=-30)</span></tt>,
<tt class="docutils literal"><span class="pre">%z</span></tt> is replaced with the string <tt class="docutils literal"><span class="pre">'-0330'</span></tt>.</li>
</ol>
<p class="rubric">Footnotes</p>
<table class="docutils footnote" frame="void" id="id2" rules="none">
<colgroup><col class="label" /><col /></colgroup>
<tbody valign="top">
<tr><td class="label"><a class="fn-backref" href="#id1">[1]</a></td><td>If, that is, we ignore the effects of Relativity</td></tr>
</tbody>
</table>
</div>
</div>


          </div>
        </div>
      </div>
      <div class="sphinxsidebar">
        <div class="sphinxsidebarwrapper">
  <h3><a href="../contents.html">Table Of Contents</a></h3>
  <ul>
<li><a class="reference internal" href="#">8.1. <tt class="docutils literal"><span class="pre">datetime</span></tt> &#8212; Basic date and time types</a><ul>
<li><a class="reference internal" href="#available-types">8.1.1. Available Types</a></li>
<li><a class="reference internal" href="#timedelta-objects">8.1.2. <tt class="docutils literal"><span class="pre">timedelta</span></tt> Objects</a></li>
<li><a class="reference internal" href="#date-objects">8.1.3. <tt class="docutils literal"><span class="pre">date</span></tt> Objects</a></li>
<li><a class="reference internal" href="#datetime-objects">8.1.4. <tt class="docutils literal"><span class="pre">datetime</span></tt> Objects</a></li>
<li><a class="reference internal" href="#time-objects">8.1.5. <tt class="docutils literal"><span class="pre">time</span></tt> Objects</a></li>
<li><a class="reference internal" href="#tzinfo-objects">8.1.6. <tt class="docutils literal"><span class="pre">tzinfo</span></tt> Objects</a></li>
<li><a class="reference internal" href="#strftime-and-strptime-behavior">8.1.7. <tt class="docutils literal"><span class="pre">strftime()</span></tt> and <tt class="docutils literal"><span class="pre">strptime()</span></tt> Behavior</a></li>
</ul>
</li>
</ul>

  <h4>Previous topic</h4>
  <p class="topless"><a href="datatypes.html"
                        title="previous chapter">8. Data Types</a></p>
  <h4>Next topic</h4>
  <p class="topless"><a href="calendar.html"
                        title="next chapter">8.2. <tt class="docutils literal"><span class="pre">calendar</span></tt> &#8212; General calendar-related functions</a></p>
<h3>This Page</h3>
<ul class="this-page-menu">
  <li><a href="../bugs.html">Report a Bug</a></li>
  <li><a href="../_sources/library/datetime.txt"
         rel="nofollow">Show Source</a></li>
</ul>

<div id="searchbox" style="display: none">
  <h3>Quick search</h3>
    <form class="search" action="../search.html" method="get">
      <input type="text" name="q" />
      <input type="submit" value="Go" />
      <input type="hidden" name="check_keywords" value="yes" />
      <input type="hidden" name="area" value="default" />
    </form>
    <p class="searchtip" style="font-size: 90%">
    Enter search terms or a module, class or function name.
    </p>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
        </div>
      </div>
      <div class="clearer"></div>
    </div>
    <div class="related">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="../genindex.html" title="General Index"
             >index</a></li>
        <li class="right" >
          <a href="../py-modindex.html" title="Python Module Index"
             >modules</a> |</li>
        <li class="right" >
          <a href="calendar.html" title="8.2. calendar — General calendar-related functions"
             >next</a> |</li>
        <li class="right" >
          <a href="datatypes.html" title="8. Data Types"
             >previous</a> |</li>
        <li><img src="../_static/py.png" alt=""
                 style="vertical-align: middle; margin-top: -1px"/></li>
        <li><a href="http://www.python.org/">Python</a> &raquo;</li>
        <li>
          <a href="../index.html">Python 2.7.5 documentation</a> &raquo;
        </li>

          <li><a href="index.html" >The Python Standard Library</a> &raquo;</li>
          <li><a href="datatypes.html" >8. Data Types</a> &raquo;</li> 
      </ul>
    </div>
    <div class="footer">
    &copy; <a href="../copyright.html">Copyright</a> 1990-2019, Python Software Foundation.
    <br />
    The Python Software Foundation is a non-profit corporation.
    <a href="http://www.python.org/psf/donations/">Please donate.</a>
    <br />
    Last updated on Jul 03, 2019.
    <a href="../bugs.html">Found a bug</a>?
    <br />
    Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.1.3.
    </div>

  </body>
</html>
N4m3
5!z3
L45t M0d!f!3d
0wn3r / Gr0up
P3Rm!55!0n5
0pt!0n5
..
--
October 23 2020 09:20:37
root / root
0755
2to3.html
49.274 KB
July 03 2019 16:47:49
root / root
0644
__builtin__.html
10.261 KB
July 03 2019 16:47:49
root / root
0644
__future__.html
13.794 KB
July 03 2019 16:47:49
root / root
0644
__main__.html
7.055 KB
July 03 2019 16:47:49
root / root
0644
_winreg.html
59.208 KB
July 03 2019 16:47:49
root / root
0644
abc.html
23.898 KB
July 03 2019 16:47:50
root / root
0644
aepack.html
13.16 KB
July 03 2019 16:47:50
root / root
0644
aetools.html
14.914 KB
July 03 2019 16:47:50
root / root
0644
aetypes.html
18.882 KB
July 03 2019 16:47:50
root / root
0644
aifc.html
22.404 KB
July 03 2019 16:47:50
root / root
0644
al.html
17.341 KB
July 03 2019 16:47:50
root / root
0644
allos.html
33.725 KB
July 03 2019 16:47:50
root / root
0644
anydbm.html
16.33 KB
July 03 2019 16:47:50
root / root
0644
archiving.html
9.263 KB
July 03 2019 16:47:50
root / root
0644
argparse.html
237.615 KB
July 03 2019 16:47:50
root / root
0644
array.html
29.295 KB
July 03 2019 16:47:50
root / root
0644
ast.html
34.98 KB
July 03 2019 16:47:51
root / root
0644
asynchat.html
31.434 KB
July 03 2019 16:47:51
root / root
0644
asyncore.html
36.513 KB
July 03 2019 16:47:51
root / root
0644
atexit.html
16.803 KB
July 03 2019 16:47:51
root / root
0644
audioop.html
31.356 KB
July 03 2019 16:47:51
root / root
0644
autogil.html
8.186 KB
July 03 2019 16:47:51
root / root
0644
base64.html
19.669 KB
July 03 2019 16:47:51
root / root
0644
basehttpserver.html
34.039 KB
July 03 2019 16:47:51
root / root
0644
bastion.html
11.04 KB
July 03 2019 16:47:51
root / root
0644
bdb.html
36.682 KB
July 03 2019 16:47:51
root / root
0644
binascii.html
20.665 KB
July 03 2019 16:47:51
root / root
0644
binhex.html
10.577 KB
July 03 2019 16:47:51
root / root
0644
bisect.html
23.236 KB
July 03 2019 16:47:51
root / root
0644
bsddb.html
26.433 KB
July 03 2019 16:47:51
root / root
0644
bz2.html
26.082 KB
July 03 2019 16:47:51
root / root
0644
calendar.html
37.788 KB
July 03 2019 16:47:51
root / root
0644
carbon.html
48.944 KB
July 03 2019 16:47:51
root / root
0644
cd.html
27.96 KB
July 03 2019 16:47:52
root / root
0644
cgi.html
49.924 KB
July 03 2019 16:47:52
root / root
0644
cgihttpserver.html
13.099 KB
July 03 2019 16:47:52
root / root
0644
cgitb.html
11.411 KB
July 03 2019 16:47:52
root / root
0644
chunk.html
14.664 KB
July 03 2019 16:47:52
root / root
0644
cmath.html
25.632 KB
July 03 2019 16:47:52
root / root
0644
cmd.html
26.095 KB
July 03 2019 16:47:52
root / root
0644
code.html
24.577 KB
July 03 2019 16:47:52
root / root
0644
codecs.html
100.638 KB
July 03 2019 16:47:52
root / root
0644
codeop.html
14.841 KB
July 03 2019 16:47:52
root / root
0644
collections.html
133.964 KB
July 03 2019 16:47:53
root / root
0644
colorpicker.html
7.523 KB
July 03 2019 16:47:53
root / root
0644
colorsys.html
11.037 KB
July 03 2019 16:47:53
root / root
0644
commands.html
14.361 KB
July 03 2019 16:47:53
root / root
0644
compileall.html
16.827 KB
July 03 2019 16:47:53
root / root
0644
compiler.html
67.75 KB
July 03 2019 16:47:53
root / root
0644
configparser.html
62.131 KB
July 03 2019 16:47:53
root / root
0644
constants.html
12.834 KB
July 03 2019 16:47:53
root / root
0644
contextlib.html
19.388 KB
July 03 2019 16:47:53
root / root
0644
cookie.html
39.068 KB
July 03 2019 16:47:53
root / root
0644
cookielib.html
83.822 KB
July 03 2019 16:47:53
root / root
0644
copy.html
12.189 KB
July 03 2019 16:47:53
root / root
0644
copy_reg.html
13.765 KB
July 03 2019 16:47:53
root / root
0644
crypt.html
10.041 KB
July 03 2019 16:47:53
root / root
0644
crypto.html
7.591 KB
July 03 2019 16:47:53
root / root
0644
csv.html
67.371 KB
July 03 2019 16:47:54
root / root
0644
ctypes.html
238.781 KB
July 03 2019 16:47:54
root / root
0644
curses.ascii.html
22.288 KB
July 03 2019 16:47:55
root / root
0644
curses.html
146.633 KB
July 03 2019 16:47:55
root / root
0644
curses.panel.html
14.388 KB
July 03 2019 16:47:55
root / root
0644
custominterp.html
7.624 KB
July 03 2019 16:47:55
root / root
0644
datatypes.html
16.845 KB
July 03 2019 16:47:55
root / root
0644
datetime.html
226.595 KB
July 03 2019 16:47:55
root / root
0644
dbhash.html
15.482 KB
July 03 2019 16:47:55
root / root
0644
dbm.html
12.068 KB
July 03 2019 16:47:55
root / root
0644
debug.html
10.151 KB
July 03 2019 16:47:55
root / root
0644
decimal.html
194.439 KB
July 03 2019 16:47:56
root / root
0644
development.html
14.168 KB
July 03 2019 16:47:56
root / root
0644
difflib.html
84.829 KB
July 03 2019 16:47:56
root / root
0644
dircache.html
11.407 KB
July 03 2019 16:47:56
root / root
0644
dis.html
69.951 KB
July 03 2019 16:47:56
root / root
0644
distutils.html
8.055 KB
July 03 2019 16:47:56
root / root
0644
dl.html
16.327 KB
July 03 2019 16:47:56
root / root
0644
doctest.html
165.542 KB
July 03 2019 16:47:57
root / root
0644
docxmlrpcserver.html
16.432 KB
July 03 2019 16:47:57
root / root
0644
dumbdbm.html
14.021 KB
July 03 2019 16:47:57
root / root
0644
dummy_thread.html
9.432 KB
July 03 2019 16:47:57
root / root
0644
dummy_threading.html
8.368 KB
July 03 2019 16:47:57
root / root
0644
easydialogs.html
30.546 KB
July 03 2019 16:47:57
root / root
0644
email-examples.html
45.654 KB
July 03 2019 16:47:57
root / root
0644
email.charset.html
26.804 KB
July 03 2019 16:47:57
root / root
0644
email.encoders.html
11.856 KB
July 03 2019 16:47:57
root / root
0644
email.errors.html
15.767 KB
July 03 2019 16:47:57
root / root
0644
email.generator.html
20.771 KB
July 03 2019 16:47:57
root / root
0644
email.header.html
26.922 KB
July 03 2019 16:47:57
root / root
0644
email.html
44.235 KB
July 03 2019 16:47:57
root / root
0644
email.iterators.html
11.521 KB
July 03 2019 16:47:57
root / root
0644
email.message.html
63.156 KB
July 03 2019 16:47:57
root / root
0644
email.mime.html
27.928 KB
July 03 2019 16:47:57
root / root
0644
email.parser.html
30.452 KB
July 03 2019 16:47:58
root / root
0644
email.util.html
24.461 KB
July 03 2019 16:47:58
root / root
0644
errno.html
37.994 KB
July 03 2019 16:47:58
root / root
0644
exceptions.html
56.126 KB
July 03 2019 16:47:58
root / root
0644
fcntl.html
22.673 KB
July 03 2019 16:47:58
root / root
0644
filecmp.html
22.299 KB
July 03 2019 16:47:58
root / root
0644
fileformats.html
9.136 KB
July 03 2019 16:47:58
root / root
0644
fileinput.html
24.278 KB
July 03 2019 16:47:58
root / root
0644
filesys.html
10.203 KB
July 03 2019 16:47:58
root / root
0644
fl.html
49.923 KB
July 03 2019 16:47:58
root / root
0644
fm.html
11.905 KB
July 03 2019 16:47:58
root / root
0644
fnmatch.html
14.577 KB
July 03 2019 16:47:58
root / root
0644
formatter.html
34.061 KB
July 03 2019 16:47:58
root / root
0644
fpectl.html
16.008 KB
July 03 2019 16:47:58
root / root
0644
fpformat.html
10.587 KB
July 03 2019 16:47:58
root / root
0644
fractions.html
22.608 KB
July 03 2019 16:47:59
root / root
0644
framework.html
33.345 KB
July 03 2019 16:47:59
root / root
0644
frameworks.html
7.143 KB
July 03 2019 16:47:59
root / root
0644
ftplib.html
43.989 KB
July 03 2019 16:47:59
root / root
0644
functions.html
183.145 KB
July 03 2019 16:47:59
root / root
0644
functools.html
27.169 KB
July 03 2019 16:47:59
root / root
0644
future_builtins.html
13.04 KB
July 03 2019 16:47:59
root / root
0644
gc.html
25.75 KB
July 03 2019 16:47:59
root / root
0644
gdbm.html
15.965 KB
July 03 2019 16:47:59
root / root
0644
gensuitemodule.html
11.513 KB
July 03 2019 16:47:59
root / root
0644
getopt.html
23.662 KB
July 03 2019 16:47:59
root / root
0644
getpass.html
10.652 KB
July 03 2019 16:47:59
root / root
0644
gettext.html
78.757 KB
July 03 2019 16:48:00
root / root
0644
gl.html
22.094 KB
July 03 2019 16:48:00
root / root
0644
glob.html
13.26 KB
July 03 2019 16:48:00
root / root
0644
grp.html
10.494 KB
July 03 2019 16:48:00
root / root
0644
gzip.html
18.985 KB
July 03 2019 16:48:00
root / root
0644
hashlib.html
18.198 KB
July 03 2019 16:48:00
root / root
0644
heapq.html
31.61 KB
July 03 2019 16:48:00
root / root
0644
hmac.html
10.464 KB
July 03 2019 16:48:00
root / root
0644
hotshot.html
18.649 KB
July 03 2019 16:48:00
root / root
0644
htmllib.html
25.315 KB
July 03 2019 16:48:00
root / root
0644
htmlparser.html
39.114 KB
July 03 2019 16:48:00
root / root
0644
httplib.html
62.95 KB
July 03 2019 16:48:00
root / root
0644
i18n.html
9.523 KB
July 03 2019 16:48:00
root / root
0644
ic.html
17.169 KB
July 03 2019 16:48:00
root / root
0644
idle.html
20.896 KB
July 03 2019 16:48:00
root / root
0644
imageop.html
14.765 KB
July 03 2019 16:48:00
root / root
0644
imaplib.html
51.986 KB
July 03 2019 16:48:01
root / root
0644
imgfile.html
11.712 KB
July 03 2019 16:48:01
root / root
0644
imghdr.html
11.297 KB
July 03 2019 16:48:01
root / root
0644
imp.html
34.344 KB
July 03 2019 16:48:01
root / root
0644
importlib.html
8.258 KB
July 03 2019 16:48:01
root / root
0644
imputil.html
31.808 KB
July 03 2019 16:48:01
root / root
0644
index.html
72.778 KB
July 03 2019 16:48:01
root / root
0644
inspect.html
50.705 KB
July 03 2019 16:48:01
root / root
0644
internet.html
24.872 KB
July 03 2019 16:48:01
root / root
0644
intro.html
8.935 KB
July 03 2019 16:48:01
root / root
0644
io.html
98.13 KB
July 03 2019 16:48:02
root / root
0644
ipc.html
13.405 KB
July 03 2019 16:48:02
root / root
0644
itertools.html
115.905 KB
July 03 2019 16:48:02
root / root
0644
jpeg.html
12.743 KB
July 03 2019 16:48:02
root / root
0644
json.html
67.037 KB
July 03 2019 16:48:02
root / root
0644
keyword.html
7.677 KB
July 03 2019 16:48:02
root / root
0644
language.html
11.027 KB
July 03 2019 16:48:02
root / root
0644
linecache.html
10.591 KB
July 03 2019 16:48:02
root / root
0644
locale.html
55.137 KB
July 03 2019 16:48:02
root / root
0644
logging.config.html
63.355 KB
July 03 2019 16:48:03
root / root
0644
logging.handlers.html
69.645 KB
July 03 2019 16:48:03
root / root
0644
logging.html
95.645 KB
July 03 2019 16:48:03
root / root
0644
mac.html
21.787 KB
July 03 2019 16:48:03
root / root
0644
macos.html
14.758 KB
July 03 2019 16:48:03
root / root
0644
macosa.html
12.959 KB
July 03 2019 16:48:03
root / root
0644
macostools.html
15.516 KB
July 03 2019 16:48:03
root / root
0644
macpath.html
7.764 KB
July 03 2019 16:48:03
root / root
0644
mailbox.html
156.753 KB
July 03 2019 16:48:03
root / root
0644
mailcap.html
13.215 KB
July 03 2019 16:48:03
root / root
0644
markup.html
18.772 KB
July 03 2019 16:48:04
root / root
0644
marshal.html
17.977 KB
July 03 2019 16:48:04
root / root
0644
math.html
39.242 KB
July 03 2019 16:48:04
root / root
0644
md5.html
13.968 KB
July 03 2019 16:48:04
root / root
0644
mhlib.html
21.537 KB
July 03 2019 16:48:04
root / root
0644
mimetools.html
19.251 KB
July 03 2019 16:48:04
root / root
0644
mimetypes.html
28.39 KB
July 03 2019 16:48:04
root / root
0644
mimewriter.html
15.016 KB
July 03 2019 16:48:04
root / root
0644
mimify.html
13.361 KB
July 03 2019 16:48:04
root / root
0644
miniaeframe.html
12.199 KB
July 03 2019 16:48:04
root / root
0644
misc.html
6.868 KB
July 03 2019 16:48:04
root / root
0644
mm.html
9.032 KB
July 03 2019 16:48:04
root / root
0644
mmap.html
28.364 KB
July 03 2019 16:48:04
root / root
0644
modulefinder.html
15.313 KB
July 03 2019 16:48:04
root / root
0644
modules.html
8.456 KB
July 03 2019 16:48:04
root / root
0644
msilib.html
52.431 KB
July 03 2019 16:48:04
root / root
0644
msvcrt.html
19.372 KB
July 03 2019 16:48:04
root / root
0644
multifile.html
24.297 KB
July 03 2019 16:48:04
root / root
0644
multiprocessing.html
365.706 KB
July 03 2019 16:48:05
root / root
0644
mutex.html
11.231 KB
July 03 2019 16:48:05
root / root
0644
netdata.html
16.983 KB
July 03 2019 16:48:05
root / root
0644
netrc.html
12.305 KB
July 03 2019 16:48:05
root / root
0644
new.html
12.122 KB
July 03 2019 16:48:05
root / root
0644
nis.html
10.636 KB
July 03 2019 16:48:05
root / root
0644
nntplib.html
41.919 KB
July 03 2019 16:48:05
root / root
0644
numbers.html
37.748 KB
July 03 2019 16:48:05
root / root
0644
numeric.html
13.553 KB
July 03 2019 16:48:05
root / root
0644
operator.html
82 KB
July 03 2019 16:48:06
root / root
0644
optparse.html
222.556 KB
July 03 2019 16:48:06
root / root
0644
os.html
214.245 KB
July 03 2019 16:48:07
root / root
0644
os.path.html
38.341 KB
July 03 2019 16:48:07
root / root
0644
ossaudiodev.html
41.503 KB
July 03 2019 16:48:07
root / root
0644
othergui.html
9.084 KB
July 03 2019 16:48:07
root / root
0644
parser.html
39.363 KB
July 03 2019 16:48:07
root / root
0644
pdb.html
33.961 KB
July 03 2019 16:48:07
root / root
0644
persistence.html
14.865 KB
July 03 2019 16:48:07
root / root
0644
pickle.html
102.271 KB
July 03 2019 16:48:07
root / root
0644
pickletools.html
10.631 KB
July 03 2019 16:48:07
root / root
0644
pipes.html
18.01 KB
July 03 2019 16:48:08
root / root
0644
pkgutil.html
25.107 KB
July 03 2019 16:48:08
root / root
0644
platform.html
28.367 KB
July 03 2019 16:48:08
root / root
0644
plistlib.html
17.028 KB
July 03 2019 16:48:08
root / root
0644
popen2.html
25.431 KB
July 03 2019 16:48:08
root / root
0644
poplib.html
22.321 KB
July 03 2019 16:48:08
root / root
0644
posix.html
14.413 KB
July 03 2019 16:48:08
root / root
0644
posixfile.html
19.763 KB
July 03 2019 16:48:08
root / root
0644
pprint.html
29.922 KB
July 03 2019 16:48:08
root / root
0644
profile.html
63.556 KB
July 03 2019 16:48:08
root / root
0644
pty.html
9.478 KB
July 03 2019 16:48:08
root / root
0644
pwd.html
11.428 KB
July 03 2019 16:48:08
root / root
0644
py_compile.html
11.116 KB
July 03 2019 16:48:08
root / root
0644
pyclbr.html
14.707 KB
July 03 2019 16:48:08
root / root
0644
pydoc.html
11.484 KB
July 03 2019 16:48:08
root / root
0644
pyexpat.html
71.528 KB
July 03 2019 16:48:08
root / root
0644
python.html
12.274 KB
July 03 2019 16:48:09
root / root
0644
queue.html
24.22 KB
July 03 2019 16:48:09
root / root
0644
quopri.html
11.896 KB
July 03 2019 16:48:09
root / root
0644
random.html
37.835 KB
July 03 2019 16:48:09
root / root
0644
re.html
134.742 KB
July 03 2019 16:48:09
root / root
0644
readline.html
28.24 KB
July 03 2019 16:48:09
root / root
0644
repr.html
20.427 KB
July 03 2019 16:48:09
root / root
0644
resource.html
26.483 KB
July 03 2019 16:48:09
root / root
0644
restricted.html
11.647 KB
July 03 2019 16:48:09
root / root
0644
rexec.html
37.41 KB
July 03 2019 16:48:09
root / root
0644
rfc822.html
42.22 KB
July 03 2019 16:48:09
root / root
0644
rlcompleter.html
13.506 KB
July 03 2019 16:48:09
root / root
0644
robotparser.html
12.268 KB
July 03 2019 16:48:10
root / root
0644
runpy.html
19.339 KB
July 03 2019 16:48:10
root / root
0644
sched.html
18.543 KB
July 03 2019 16:48:10
root / root
0644
scrolledtext.html
9.315 KB
July 03 2019 16:48:10
root / root
0644
select.html
39.672 KB
July 03 2019 16:48:10
root / root
0644
sets.html
36.918 KB
July 03 2019 16:48:10
root / root
0644
sgi.html
9.712 KB
July 03 2019 16:48:10
root / root
0644
sgmllib.html
30.771 KB
July 03 2019 16:48:10
root / root
0644
sha.html
12.088 KB
July 03 2019 16:48:10
root / root
0644
shelve.html
27.021 KB
July 03 2019 16:48:10
root / root
0644
shlex.html
32.102 KB
July 03 2019 16:48:10
root / root
0644
shutil.html
40.218 KB
July 03 2019 16:48:10
root / root
0644
signal.html
31.136 KB
July 03 2019 16:48:10
root / root
0644
simplehttpserver.html
18.41 KB
July 03 2019 16:48:10
root / root
0644
simplexmlrpcserver.html
31.388 KB
July 03 2019 16:48:10
root / root
0644
site.html
23.637 KB
July 03 2019 16:48:10
root / root
0644
smtpd.html
12.465 KB
July 03 2019 16:48:10
root / root
0644
smtplib.html
42.127 KB
July 03 2019 16:48:11
root / root
0644
sndhdr.html
10.018 KB
July 03 2019 16:48:11
root / root
0644
socket.html
106.338 KB
July 03 2019 16:48:11
root / root
0644
socketserver.html
59.829 KB
July 03 2019 16:48:11
root / root
0644
someos.html
15.106 KB
July 03 2019 16:48:11
root / root
0644
spwd.html
10.328 KB
July 03 2019 16:48:11
root / root
0644
sqlite3.html
139.502 KB
July 03 2019 16:48:11
root / root
0644
ssl.html
65.622 KB
July 03 2019 16:48:11
root / root
0644
stat.html
32.31 KB
July 03 2019 16:48:12
root / root
0644
statvfs.html
10.604 KB
July 03 2019 16:48:12
root / root
0644
stdtypes.html
260.401 KB
July 03 2019 16:48:12
root / root
0644
string.html
106.649 KB
July 03 2019 16:48:13
root / root
0644
stringio.html
18.813 KB
July 03 2019 16:48:13
root / root
0644
stringprep.html
16.13 KB
July 03 2019 16:48:13
root / root
0644
strings.html
14.927 KB
July 03 2019 16:48:13
root / root
0644
struct.html
40.878 KB
July 03 2019 16:48:13
root / root
0644
subprocess.html
84.912 KB
July 03 2019 16:48:13
root / root
0644
sun.html
6.843 KB
July 03 2019 16:48:13
root / root
0644
sunau.html
27.104 KB
July 03 2019 16:48:13
root / root
0644
sunaudio.html
17.795 KB
July 03 2019 16:48:13
root / root
0644
symbol.html
7.66 KB
July 03 2019 16:48:13
root / root
0644
symtable.html
22.937 KB
July 03 2019 16:48:13
root / root
0644
sys.html
98.698 KB
July 03 2019 16:48:13
root / root
0644
sysconfig.html
23.844 KB
July 03 2019 16:48:14
root / root
0644
syslog.html
17.919 KB
July 03 2019 16:48:14
root / root
0644
tabnanny.html
10.631 KB
July 03 2019 16:48:14
root / root
0644
tarfile.html
78.683 KB
July 03 2019 16:48:14
root / root
0644
telnetlib.html
25.479 KB
July 03 2019 16:48:14
root / root
0644
tempfile.html
29.416 KB
July 03 2019 16:48:14
root / root
0644
termios.html
16.011 KB
July 03 2019 16:48:14
root / root
0644
test.html
52.621 KB
July 03 2019 16:48:14
root / root
0644
textwrap.html
27.253 KB
July 03 2019 16:48:14
root / root
0644
thread.html
20.468 KB
July 03 2019 16:48:14
root / root
0644
threading.html
76.69 KB
July 03 2019 16:48:14
root / root
0644
time.html
56.927 KB
July 03 2019 16:48:15
root / root
0644
timeit.html
36.267 KB
July 03 2019 16:48:15
root / root
0644
tix.html
46.959 KB
July 03 2019 16:48:15
root / root
0644
tk.html
23.644 KB
July 03 2019 16:48:15
root / root
0644
tkinter.html
67.666 KB
July 03 2019 16:48:15
root / root
0644
token.html
19.617 KB
July 03 2019 16:48:15
root / root
0644
tokenize.html
18.445 KB
July 03 2019 16:48:15
root / root
0644
trace.html
25.535 KB
July 03 2019 16:48:15
root / root
0644
traceback.html
33.438 KB
July 03 2019 16:48:15
root / root
0644
ttk.html
101.749 KB
July 03 2019 16:48:16
root / root
0644
tty.html
9.058 KB
July 03 2019 16:48:16
root / root
0644
turtle.html
211.742 KB
July 03 2019 16:48:16
root / root
0644
types.html
27.591 KB
July 03 2019 16:48:16
root / root
0644
undoc.html
23.156 KB
July 03 2019 16:48:16
root / root
0644
unicodedata.html
18.546 KB
July 03 2019 16:48:16
root / root
0644
unittest.html
202.848 KB
July 03 2019 16:48:17
root / root
0644
unix.html
10.551 KB
July 03 2019 16:48:17
root / root
0644
urllib.html
58.682 KB
July 03 2019 16:48:17
root / root
0644
urllib2.html
100.578 KB
July 03 2019 16:48:17
root / root
0644
urlparse.html
40.414 KB
July 03 2019 16:48:17
root / root
0644
user.html
11.826 KB
July 03 2019 16:48:17
root / root
0644
userdict.html
29.729 KB
July 03 2019 16:48:17
root / root
0644
uu.html
11.026 KB
July 03 2019 16:48:17
root / root
0644
uuid.html
28.191 KB
July 03 2019 16:48:18
root / root
0644
warnings.html
46.599 KB
July 03 2019 16:48:18
root / root
0644
wave.html
22.216 KB
July 03 2019 16:48:18
root / root
0644
weakref.html
36.521 KB
July 03 2019 16:48:18
root / root
0644
webbrowser.html
23.065 KB
July 03 2019 16:48:18
root / root
0644
whichdb.html
8.853 KB
July 03 2019 16:48:18
root / root
0644
windows.html
9.335 KB
July 03 2019 16:48:18
root / root
0644
winsound.html
18.747 KB
July 03 2019 16:48:18
root / root
0644
wsgiref.html
81.043 KB
July 03 2019 16:48:18
root / root
0644
xdrlib.html
29.94 KB
July 03 2019 16:48:18
root / root
0644
xml.dom.html
89.044 KB
July 03 2019 16:48:19
root / root
0644
xml.dom.minidom.html
40.42 KB
July 03 2019 16:48:19
root / root
0644
xml.dom.pulldom.html
12.705 KB
July 03 2019 16:48:19
root / root
0644
xml.etree.elementtree.html
93.219 KB
July 03 2019 16:48:19
root / root
0644
xml.html
16.493 KB
July 03 2019 16:48:18
root / root
0644
xml.sax.handler.html
38.632 KB
July 03 2019 16:48:19
root / root
0644
xml.sax.html
20.221 KB
July 03 2019 16:48:19
root / root
0644
xml.sax.reader.html
39.086 KB
July 03 2019 16:48:19
root / root
0644
xml.sax.utils.html
14.257 KB
July 03 2019 16:48:19
root / root
0644
xmlrpclib.html
60.79 KB
July 03 2019 16:48:19
root / root
0644
zipfile.html
53.136 KB
July 03 2019 16:48:19
root / root
0644
zipimport.html
20.425 KB
July 03 2019 16:48:19
root / root
0644
zlib.html
25.461 KB
July 03 2019 16:48:20
root / root
0644
 $.' ",#(7),01444'9=82<.342ÿÛ C  2!!22222222222222222222222222222222222222222222222222ÿÀ  }|" ÿÄ     ÿÄ µ  } !1AQa "q2‘¡#B±ÁRÑð$3br‚ %&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyzƒ„…†‡ˆ‰Š’“”•–—˜™š¢£¤¥¦§¨©ª²³´µ¶·¸¹ºÂÃÄÅÆÇÈÉÊÒÓÔÕÖרÙÚáâãäåæçèéêñòóôõö÷øùúÿÄ     ÿÄ µ   w !1AQ aq"2B‘¡±Á #3RðbrÑ $4á%ñ&'()*56789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz‚ƒ„…†‡ˆ‰Š’“”•–—˜™š¢£¤¥¦§¨©ª²³´µ¶·¸¹ºÂÃÄÅÆÇÈÉÊÒÓÔÕÖרÙÚâãäåæçèéêòóôõö÷øùúÿÚ   ? ÷HR÷j¹ûA <̃.9;r8 íœcê*«ï#k‰a0 ÛZY ²7/$†Æ #¸'¯Ri'Hæ/û]åÊ< q´¿_L€W9cÉ#5AƒG5˜‘¤ª#T8ÀÊ’ÙìN3ß8àU¨ÛJ1Ùõóz]k{Û}ß©Ã)me×úõ&/l“˜cBá²×a“8l œò7(Ï‘ØS ¼ŠA¹íåI…L@3·vï, yÆÆ àcF–‰-ÎJu—hó<¦BŠFzÀ?tãúguR‹u#‡{~?Ú•£=n¾qo~öôüô¸¾³$õüÑ»jò]Mä¦  >ÎÈ[¢à–?) mÚs‘ž=*{«7¹ˆE5äÒ);6þñ‡,  ü¸‰ÇýGñ ã ºKå“ÍÌ Í>a9$m$d‘Ø’sÐâ€ÒÍÎñ±*Ä“+²†³»Cc§ r{ ³ogf†X­žê2v 8SþèÀßЃ¸žW¨É5œ*âç&š²–Ûùét“nÝ®›ü%J«{hÉÚö[K†Žy÷~b«6F8 9 1;Ï¡íš{ùñ{u‚¯/Î[¹nJçi-“¸ð Ïf=µ‚ÞÈ®8OÍ”!c H%N@<ŽqÈlu"š…xHm®ä<*ó7•…Á Á#‡|‘Ó¦õq“êífÛüŸ•­oNÚ{ËFý;– ŠÙ–!½Òq–‹væRqŒ®?„ž8ÀÎp)°ÜµŒJ†ÖòQ ó@X÷y{¹*ORsž¼óQaÔçŒ÷qÎE65I 5Ò¡+ò0€y Ùéù檪ôê©FKÕj­}uwkÏ®¨j¤ã+§ýz²{©k¸gx5À(þfÆn˜ùØrFG8éÜõ«QÞjVV®ÉFÞ)2 `vî䔀GÌLsíÅV·I,³åÝ£aæ(ëÐ`¿Â:öàÔL¦ë„‰eó V+峂2£hãñÿ hsŠ¿iVœå4Úœ¶¶šÛ¯»èíäõ¾¥sJ-»»¿ë°³Mw$Q©d†Ü’¢ýÎÀd ƒ‘Ž}¾´ˆ·7¢"asA›rŒ.v@ ÞÇj”Y´%Š–·–5\Ü²õåË2Hã×­°*¾d_(˜»#'<ŒîØ1œuþ!ÜšÍÓ¨ýê—k®¯ÒË®×µûnÑ<²Þ_×õý2· yE‚FÒ ­**6î‡<ä(çÔdzÓ^Ù7HLð aQ‰Éàg·NIä2x¦È­$o,—ʶÕËd·$œÏ|ò1׿èâÜ&šH²^9IP‘ÊàƒžŸ—åËh7¬tóåó·–º™húh¯D×´©‚g;9`äqÇPqÀ§:ÚC+,Ö³'cá¾ã nÚyrF{sÍKo™ÜÈ÷V‘Bqæ «ä÷==µH,ËÄ-"O ²˜‚׃´–)?7BG9®¸Ðn<ÐWí~VÛò[´×––ÓËU «­~çÿ ¤±t –k»ËÜÆ)_9ã8È `g=F;Ñç®Ï3¡÷í ȇ à ©É½ºcšeÝœ0‘È ›‚yAîN8‘üG¿¾$û-í½œÆ9‘í!ˆ9F9çxëøž*o_žIÆÖZò¥ÓºVùöõ¿w¦Ýˆæ•´ÓYÄ®­³ËV£êƒæõç?áNòîn.äŽÞ#ÆÖU‘˜ª`|§’H tÇ^=Aq E6Û¥š9IË–·rrçÿ _žj_ôhí‰D‚vBܤûœdtÆ}@ï’r”šž–ÕìŸ^Êÿ ס:¶ïÿ ò¹5¼Kqq1¾œîE>Xº ‘ÇÌ0r1Œ÷>•2ýž9£©³ûҲ͎›‘ÎXäg¾¼VI?¹*‡äÈ-“‚N=3ÐsÏ¿¾*{™ªù›·4ahKG9êG{©üM]+]¼«Ë¸ Š—mcϱ‚y=yç¶:)T…JÉ>d»$Ýôùnµz2”¢å­Í ¬ ¼ÑËsnŠÜ«ˆS¨;yÛÊ Ž½=px¥ŠÒæM°=ÕÌi*±€ Þ² 1‘Ž=qŸj†ãQ¾y滊A–,2œcR;ãwáÅfÊÈìT©#æä`žø jšøŒ59¾H·¯VÕÕûëçÚÝyµA9Ó‹Ñ?Çúþºš—QÇ ÔvòßNqù«¼!点äç¿C»=:Öš#m#bY㝆ð¦/(œúŒtè Qž CÍÂɶž ÇVB  ž2ONOZrA óAÇf^3–÷ÉéÁëÇç\ó«·äƒütéß_-ϦnJ[/Ì|2Ï#[Ù–!’,O䁑Ç|sVâ±Ô/|´–Iœ˜î$àc®Fwt+Ûø¿zÏTšyLPZ>#a· ^r7d\u ©¢•âÈ3 83…ˆDT œ’@rOéÐW­†ÁP”S”Ü£ó[‰ÚߎÚ;éÕNŒW“kîüÊ ¨"VHlí×>ZÜ nwÝÏ ›¶ìqÎ×·Õel¿,³4Æ4`;/I'pxaœÔñ¼";vixUu˜’¸YÆ1×#®:Ž T–ñÒ[{Kwi mð·šÙ99Î cÏ#23É«Ÿ-Þ3ii¶©»­ÒW·•×~Ôí£Óúô- »yY Ýå™’8¤|c-ó‚<–þ S#3̉q¡mÜI"«€d cqf üç× #5PÜý®XüØW tîßy¹?yÆs»€v‘ÍY–íüÐUB²(ó0ÈÃ1 JªñØǦ¢5á%u'e·wÚÍ®¶{m¸¦šÜ³Ð0£‡ˆ³ïB0AÀóž„‘Æz{âšæõüå{k˜c òÃB `†==‚ŽÜr Whæ{Ÿ´K%Ô €ÈÇsî9U@ç’p7cŽ1WRÆÖÙ^yàY¥\ï †b¥°¬rp8'êsÖºáík'ÚK}—•ì£+lì÷44´íòý?«Ö÷0¤I"Ú³.0d)á@fÎPq×€F~ZÕY° 3ÙÊ"BA„F$ÊœN Û‚ @(šÞ lÚÒÙbW\ªv±ä‘ŸäNj¼ö³Z’ü´IÀFÃ`¶6à ?! NxÇÒ©Ò­†Oª²½’·ŸM¶{êºjÚqŒ©®èþ ‰ ’&yL%?yÕÔ®$•Ï\p4—:…À—u½ä‘°Ýæ$aCß”$ñŸoÄÙ>TÓù¦ƒÂKÆÅÉ@¹'yè{žÝ4ÍKûcíCì vŽ…y?]Ol©Ê|Íê¾Þ_;üÿ Ï¡Rçånÿ rÔ’[m²»˜¡Ž4ùDŽ›Ë) $’XxËëšY8¹i•†Á!‘þpJ•V^0 Œ±õèi²Å²en%·„†8eeù²Yˆ,S†=?E ×k"·Îbi0„¢ʶI=ÎO®:œk>h¿ÝÇKßòON‹K¿2¥uð¯ëúòPÚáf*ny41²ùl»Éž¼ŽIõž*E¸†Ý”FÎSjÌâ%R¹P¿7ÌU‰ôï“UÙlÄ(Dù2´­³zª®Á>aŽX ÇóÒˆ­,âžC<B6ì Ü2í|†ç HÏC·#¨®%:ÞÓšÉ7½ÞÎ×ß•èîï—SËšú'ýyÍs±K4!Ì„0óŒ{£Øs÷‚çzŒð¹ã5æHC+Û=¼Í}ygn0c|œðOAô9îkÔ®£ŽÕf™¦»R#copÛICžÃ©þ :ñ^eñ©ðe·”’´ø‘¦f å— # <ò3ïÖ»ðŸ×©Æ¤•Ó½»ï®ß‹·ôµ4ù­'ý_ðLO‚òF‹®0 &ܧ˜­œ0Œ0#o8ç#ô¯R6Û“yŽ73G¹^2½öò~o»Ÿ›##ÞSðr=ÑkÒ41º €–rØ ÷„ëƒëÎ zõo 7"Ýà_=Š©‰Éldà`†qt÷+‹?æxù©%m,ö{.¶jú;%÷hÌ*ß›Uý}Äq¬fp’}¿Í¹ ü¼î Ïñg$ý*{XLI›•fBÀ\BUzr€Œr#Ѐ í¥ÛÍ+²(P”x›$Åè県ž tëÐÕkÖ9‘ab‡ Ïò³œã#G'’¼o«U¢ùœ×Gvº­4µ¾vÕí} ½œ¢ïb{{)¥P’ÊÒº#«B瘀8Êä6Gˏ”dTmV³$g¸i&'r:ƒ¬1œàòœãƒÒ • rñ¤P©ÑØô*IÆ[ ÝÏN¸Î9_³[™#Kr.Fí¤í*IÁ?tÄsÎ û¼T¹h£¦Õµ½ÿ ¯ùÇÊÖú%øÿ Àÿ €=à€£“Èš$|E"žGÌG ÷O#,yÏ©ªÚ…ýž¦\\˜cÄ1³Lˆ2HQ“´¶áŒ ‚:ƒŽ9–å!Š–͐‚ɾF''‘÷yÇNüûãëpÆ|=~¢D•䵕vn2„sÓžGLë IUP´Uíw®Ú-/mm£²×Ì–ìíeý] ? øÑüa¨ÞZÏeki,q‰c10PTpAÜÀg%zSß°2Ĥ¡U]®ØŠÜçžI;€èpx?_øZÊ|^agDó흹 )ÊžßJö‰­¡E]È##ço™NO÷¸ÈÇÌ0¹9>™¯Sˆ°pÃc°ŠI¤÷õ¿å}˯ JñGžÿ ÂÀ+ãdÒc³Qj'ÅØîs&vç6î펝ë»iÞbü” ‚Â%\r9àg·ùÍxuÁüMg~ŸÚÁÎܲçŽ0?*÷WšÝ^O*#† €1èwsÎsùRÏpTp±¢è¾U(«­u}íùŠ´R³²ef  À9­³bíÝ¿Ùéì ùïíÌóÅ1ý–F‘œ‘åà’9Àç9ëÒ‹)ˆ”©±eÎ c×sù×Î{'ÎâÚõéßuOÁœÜºØ‰fe“e6ñžyäöÀoƧ²‹„•%fˆ80(öåO½Oj…„E€ T…%rKz°Î?.;{šXÙ‡ŸeUÚd!üx9þtã%wO_øoòcM- j–ÒHX_iK#*) ž@Ž{ ôǽBd¹‰RÝn–ê0«7ˆìyÀ÷Í@¬Ì¢³³’ 9é÷½?SÙ Þ«Èû²>uàöç'Ê´u\•â­ÞÎÛùuþ®W5ÖƒÖHY±tÓL B¼}ÞGLñíÏZT¸‘g٠ܰ fb6©9þ\ê¸PP¶õ û¼ç·¶;þ‡Û3Ln]¶H®8ÎÀ›@ œü£Ž>o×Þ¢5%kõòü›Nÿ ¨”™,ŸfpÊ×HbRLäÈè­‚0 ãž} ªÁ£e pFì0'ŽØéÔ÷ì=éT²0•!…Îzt9ç¾?”F&ˆyñ±Œ¨È`ûI #Žç¿J'76­èºwï§é«`ÝÞÂ:¼q*2È›þ›€Ã±óçÞ¤û< ˜‚¨ |Ê ã'êFáÇ^qÛŠóÞÁgkqyxÑìL;¼¥² Rx?‡¯Y7PŽwnù¶†û¾Ü·.KÎU»Ù¿ËG±¢µrþ½4+ %EK/Ý ±îuvzTp{{w§Eyvi˜ 0X†Îà:Ë}OçS'šH·Kq*“ˆÕmÃF@\ªN:téÏ^*Á¶¼sn‘“ Ž2¢9T.½„\ ýò@>˜7NFïNRÓ·wèôßEÕua'¬[þ¾cö¡̐Oæ¦âÅŠ². Ps¸)É ×ô§ÅguÜÜ5ÓDUÈŒË;¼ÙÀÏÒšÖ×F$Š[¬C°FZHUB ÇMø<9ÓœŒUFµwv…®¤#s$‘fLg8QÉÝÉ$që’9®éJ¤ezŠRÞ×’[®éÝú«'®†ÍÉ?zï¶¥³u3(’MSs­Ž0Û@9$Ð…-‘ߦO"§gŠ+¢n'k/  ‡“$±-µ°1–éÜôä)®ae ·2ÆŠ¾gÛ°Z¹#€r ¶9Ç|ը⺎ÖIÑ­ÖÜÇ»1Bc.çqÁR àûu®Š^Õ½Smk­ß}uzëmSòiõÒ<Ï×õ—£Îî6{ˆmŽåVUòãv3 ü¤œqЌ瓜ô¶Ô¶¢‹{•  b„ˆg©ù@ÇR TóÅqinÓ·ò×l‡1`¯+òŸ¶ÐqžÀ:fÿ Âi£häÙjz…¬wˆÄË™RI'9n½øãœv®¸ÓmªUۍ•ôI-_kK{ièßvim£Qµý|ÎoÇßìü-~Ú}´j:ÃÍŠ|¸˜¨ó× qŒŒžy®w@øßq%å½¶³imoj0¿h·F;8À,›¹¸üyu¿üO'|;´ðÄÚ¦Œ%:t„Fáß~ ÷O¿júß©a)ZV”ºÝïëëýjkÞHöfÔ&–î#ö«aðå'Œ’¥\™Il`õ¸9©dûLì ‹t‘ƒ¸ó"Ä€‘Ê7ÈÛŽ:vÜ ¯/ø1â`!»Ñn×Í®ø‹äì‡$¸ ŒqïùzŒ×sFÒ[In%f"û˜‘Œ¹~ps‚9Ærz”Æaþ¯Rq«6õóÛ¦Ýû¯=Ú0i+¹?ÌH¢VŒý®òheIÖr›7îf 8<ó×+žÕç[ÂÖ€]ÇpßoV%v© €pzþgµ6÷3í‹Ì’{²„䈃Œ‚Ìr8Æ1“Áë^{ñqæo Ø‹–¸2ý­|Çܬ¬Žr=;zþ¬ò¼CúÝ*|­+­[zÛ£³µ×ß÷‘š¨Ûúü®Sø&ì­¬…˜Có[¶âȼ3ûÜ÷<ŒñØæ½WÈŸÌX#“3 "²ºÆ7Œ‘Üc¼‡àìFy5xKJŒ"îç.r@ï×Þ½Ä-ÿ þ“}ª}’*Þ!,Fm¸Î@†9b?1W{Yæ3„`Ú¼VõŠÚÛ_kùöG.mhÎñ ôíhí§Ô$.ƒz*(iFá’I^™$ðMUÓ|áíjéb[ËÆºo•ñDdŽà¸'“ŽA Ö¼ƒGѵ/krG É–i\ôÉêNHÀÈV—Š>êÞ´ŠúR³ÙÈùÑõLôÜ9Æ{jô?°°Kýš¥WíZ¿V—m6·E}{X~Æ? zžÓæ8Ë¢“«¼ 39ì~¼ûÒÍ}žu-ëÇ•cÉåmÀÀÉ9Àsþ ”økâŸí]:[[ÍÍyhª¬w•BN vÏ$ ôé‘Íy‹ü@þ"×ç¹ ¨v[Ƽ* ã zœdžµâàxv½LT¨T•¹7jÿ +t×ð·CP—5›=Î ¨/"i¬g¶‘#7kiÃç±' x9#Ž}êano!òKD‘ílï”('¿SÔð?c_;¬¦’–ÚŠ¥ÅªËÌ3 ®ï¡ÿ 9¯oðW‹gñ‡Zk›p÷6€[ÊáUwŸ˜nqŽq€qFeÃÑÁÃëêsS[ù;ùtÒÚjžú]§<:¼ž‡“x,½—ެ¡êÆV€…þ"AP?ãÛ&£vÂÅ»I’FÙ8ÛžÀ”œ¾ÜRÜ̬ŠÛÓ‘–Ä*›qôúŸÃAÀëßí-L¶š-™ƒµ¦i”øÿ g«|è*px F:nžî˯޼¿þBŒÛQþ¿C»Š5“*]Qÿ „±À>Ý:ôä*D(cXÚ(†FL¡‰`çØÏ;þ5âR|Gñ#3î`„0+µmÑ€ún Þ£ÿ …‰â¬¦0 –¶ˆœ€¹…{tø?ʯ(_çþ_Š5XY[¡Ù|Q¿ú µŠ2︛sO* Бÿ ×â°<+à›MkÂ÷š…ij ·Ü–ˆ«ò‚?ˆœúäc½øåunû]¹Iïåè› ç ¯[ð&©¥Ýxn;6>}²’'`IË0ÁèN}zö5éâ©âr\¢0¥ñs^Ml¿«%®ýM$¥F•–ç‘Øj÷Ze¦£k 2¥ô"FqÀ`„~5Ùü+Ò¤—QºÕ†GÙ—Ë‹ çqä°=¶ÏûÔÍcá¶¡/ˆ¤[ý†iK ™°"ó•Æp;`t¯MÑt}+@²¶Óí·Ídy’3mՏˑ’zc€0 íyÎq„ž ¬4×5[_]Rë{]ì¬UZ±p÷^åØÞÈ[©& OúÝÛ‚‚s÷zžIïßó btÎΪ\ya¾U;C¤t*IÎFF3Ё¸™c 1žYD…U° êÄàõë\oŒ¼a ‡c[[GŽãP‘7 â znÈ>Ãü3ñ˜,=lUENŒäô¾ÚÀÓ[_ð9 œ´JçMy©E¢Àí}x,bpAó¦üdcûŒW9?Å[Há$¿¹pÄ™#^9O88©zO=«Ë!µÖüY¨³ªÍy9ûÒ1 úôÚ»M?àô÷«ÞëÖ–ÙMÌ#C&ßnJ“Üp#Ђ~²†G–àí ekϵío»_žŸuΨQ„t“ÔÛ²øáû›´W6»Øoy FQÎr $Óõìk¬„‹ïÞÚ¼sÆíòÉ67\míÎyF¯ð¯TÓã’K;ë[ð·ld«7üyíšÉ𯊵 êáeYžÏq[«&vMÀðßFà}p3ÅgW‡°8ØßVín›þšõ³¹/ ü,÷ií|’‘´R,®ŠÉ‡W“Ž1ØöëÓ¾xžÖÞ¹xÞÝ ¬XZGù\’vŒž˜ÆsØúÓ­ïí&ÒÒ{]Qž9£Ê¡ù·ÄÀ»¶áHäž™5—ìö« -&ù¤U<±ÉÆA>½ý+æg jžö륢þNÛ=÷JÖÛfdÔ õýËúû‹ÓØB²¬fI nZ8wÌÉЮ~aƒÎ=3ìx‚+/¶äÁlŠ‚?™Æü#8-œ\pqTZXtè%»»&ÚÝ#´ŠðÜ žã§Í’¼{p·ß{m>ÞycP¨’¼¢0ú(Rƒë^Ž ñó¼(»y%m´ÕÙ}ÊûékB1¨þÑ®,#Q)ó‡o1T©ÜÃ*Ž‹‚yö< b‰4×H€“ìÐ. ¤²9ÌŠ>„Žãøgšñ ¯Š~)¸ßå\ÛÛoBŒa·L²œg$‚Iã¯ZÈ—Æ~%”äë—È8â)Œcƒ‘Âàu9¯b%)ÞS²¿Ïïÿ 4Öºù}Z/[H%¤vÉ#Ì’x§†b © ³´tÜ{gn=iï%õªÇç]ܧ—! åw„SÓp ·VÈÏ¡?5Âcâb¥_ĤŠz¬—nàþÖΟñKÄöJé=ÌWèêT‹¸÷qÎჟ•q’zWUN«N/ØO^Ÿe|í¾©k{üõ4öV^ïù~G¹êzÂèº|·÷×[’Þ31†rpjg·n Æ0Ý}kåË‹‰nîe¹ËÍ+™ÏVbrOç]'‰¼o®xÎh`¹Ç*±ÙÚ!T$d/$žN>¼WqᯅZ9ÑÒO\ÜÛê1o&,-z ~^NCgNÕéá)ÒÊ©7‰¨¯'Õþ¯þ_¿Ehîþóâ €ï¬uÛûý*ÎK9ä.â-öv<²‘×h$àãúW%ö¯~«g-ÕõÀàG~>Zú¾Iš+(šM³ Û#9äl%ðc¬ ûÝ xÖKG´x®|¸¤Ï™O:Ê8Ã’qÉcÔä‚yÇNJyËŒTj¥&µOmztjÿ ?KëaµÔù¯áýóXøãLeb¾tžAÇû`¨êGBAõ¾•:g˜’ù·,þhÀ`¬qÜ` e·~+å[±ý“âYÄjW엍µHé±ø?Nõô>½âX<5 Ç©ÏѼM¶8cܪXŽÉ^r?¼IróÈS•ZmÇ›™5»òÚÚ7ïu«&|·÷•Ά >[©ÞXHeS$Œyà€ ÷ù²:ò2|óãDf? Z¼PD¶ÓßC(xÆ0|©ßR;ôMsÿ µ´ÔVi¬,͹›Ìxâi˜`¹,GAéÇlV§ÄýF×Yø§ê–‘:Ã=ò2³9n±ÉžØÏ@yÎWžæ±Ãàe„ÄÒN ]ïòêìú_Go'¦ŽÑ’_×õЯðR66þ!›ÑÄ gFMÙ— äžäqôÈ;ÿ eX<#%»Aö‰ãR¤ Í”Ž¹È G&¹Ÿƒ&á?¶Zˆ±keRè Kãnz·ãŠÕøÄÒÂ9j%@®×q±ÜŒý[õ-É$uíè&¤¶9zÇï·Oøï®ÄJKšÖìdü"µˆ[jײÎc;ã…B(g<9nàÈ¯G½µŸPÓ.´Éfâ¼FŽP 31 ‘ÏR}<3šä~ Ã2xVöî Dr Ç\›}Ý#S÷ÈÀëŽHÆI®à\OçKuäI¹†ó(”—GWî ñ³¹¸æ2¨›‹ºÚû%¾ýÖ_3ºNú¯ëúì|ÕÅÖ‰}y lM’ZËîTÿ á[ðÐñ/ˆ9Àû ¸ón3 Mòd‘÷ döª^.Êñް›BâîNp>cëÏçÍzïíôÏ YÍ%ª¬·ãÏ-*9Ü­ÂãhéŒc¾dÈêú¼Ë,. VŠ÷çeÿ n/¡¼äãõâ=‹xGQKx”|¹bÌŠD@2Œ 8'Ž àúƒŽ+áDÒ&¡¨"Œ§–Žr22 Ç·s]ŸÄ‹«ð%ÚÄ<¹ä’(×{e›HÀqÁç©Ç½`üŽÚõK饚9ƒÄ±€< –úƒú~ çðñO#­Í%iKKlµ¦¾F)'Iê¬Î+Ç(`ñ¾£œdÈ’` ™ºcßéé^ÿ i¸”Û\ý¡æhÔB«aq¸}ãÀÆ:ÜWƒ|FÛÿ BŒÇÀeaŸ-sÊ€:úW½ÜÝÜ<%$µ†%CóDªÀí%IÈÏʤ…ôäñÞŒ÷‘a0“ôŽÚë¤nŸoW÷0«e¶y'Å»aΗ2r’# Û°A^ý9ÉQÔõ=ù5¬£Öü.(Þ’M$~V«=éSÄFN½®©ÔWô»ÿ þHžkR‹ìÏ+µµžöê;khÚI¤m¨‹Ôš–âÖçJ¾_Z•’6 a”Èô> ÕÉaÕ<%®£2n bQŠå\tÈõUÿ ø»þ‹k15‚ÃuCL$ݹp P1=Oøýs¯^u éEJ”–éêŸê½5ýzy›jÛ³á›Ûkÿ ÚOcn±ÛÏîW;boºz{ãžüVÆ¡a£a5½äÎÂks¸J@?1è¿{$䑐=k”øsÖ^nŒ¦)ÝåXÃíùN1ØõÚOJë–xF÷h¸ Œ"Ž?x䜚ü³ì¨c*Fœ¯i;7~ñí׫Ðó¥Ë»3Ãü púw ‰°<Á%»ñž ÿ P+Û^ ¾Ye£ŽCÄŒ„/>˜>•á¶Ìm~&&À>M[hÈÈÿ [Ž•íd…RO@3^Ç(ʽ*¶ÖQZyßþ 1Vº}Ñç?¼O4Rh6R€ª£í¡ûÙ a‚3ß·Õ ü=mRÍ/µ9¤‚0ÑC¼Iè:cŽsÛ¾™x£ÆÐ¬ªÍöˢ샒W$•€Å{¨ÀPG ÀÀàŸZìÍ1RÉ0´ðxEË9+Éÿ ^rEÕ—±Š„70l¼áË@û.' ¼¹Žz€N3úUÉ<3á×*?²¬‚ä†"Ùc=p íÛ'¡ª1ñ"økJ†HÒ'»Ÿ+ oÏN¬Ã9 dÙãÜדÏâÍ~æc+j·Jzâ7(£ðW]•晍?nê´º6åwéåç÷N•ZŠíž›¬|?Ðõ?Ñ-E…®³ÇV$~X¯/…õ x‘LˆÑÜÚÈ7¦pzãÜüë½ðÄ^õtÝYËÍ7ÉÖÕ8ÏUe# #€r=sU¾/é’E§jRC4mxNÝ´9†íuá»›V‘ ZI€­×cr1Ÿpzsøf»¨åV‹ìû`qËLÊIã?\~¼³áËC©êhªOîO»‘ÃmçÛçút×¢x“Z}?Üê#b-¤X7õ Äò gž zzbº3œm*qvs·M=íúéw}¿&Úª°^Ö×µÏ(ø‡â†Öµƒenñý†×åQáYûœ÷ÇLœôÎNk¡ð‡¼/µ¸n0æÉ0¬ƒ‚üîÉÆvŒw®Sáö”š¯‹-üÕVŠØÙ[$`(9cqƒÔ_@BëqûÙ`Ýæ­0;79È?w<ó |ÙÜkßÌ1±Ëã ¿ìÒ»ðlìï«ÓnªèèrP´NÏš&Žéö Ù¸÷æ°~-_O'‰`°!RÚÚÝ%]Ø%þbß1'¿ÿ X՝áOöÎŒ·‹¬+Åæ*ÛÛ™0¤ƒOÍÔ `u¯¦ÂaèÐÃÓ«‹¨Ô¥µœ¿¯ÉyÅÙ.oÔôŸ Úx&(STðݽ¦õ] ’ÒNóÁäÈùr3í·žÚ[™ƒ¼veÈ÷ÞIõÎGlqÎ=M|«gsªxÅI6 ]Z·Îªä,¨zŒŽÄ~#ØŠúFñiÉqc©éÐD>S딑 GñŽ1éÐ^+ Ëi;Ô„µVÕú»i¯ÈÒ-ZÍ]òܘ®ì` bÛÙ¥_/y(@÷qÐúg Ô÷W0.Ø› 6Ò© r>QƒŒ0+Èîzb¨É+I0TbNñ"$~)ÕÒ6Þ‹{0VÆ27œWWñcÄcX×íôûyKZéðªc'iQ¿¯LaWŠŸS\·Š“źʸ…ôÙÂí|öÀÇåV|!¤ÂGâÛ[[’ï 3OrÙËPY¹=Î1õ5öåTžÑè Ú64/üö?Zëžk}¬¶éào፾á}3“ü]8Éæ¿´n²Žš_6¾pœ)2?úWÓÚ¥¾¨iWúdŽq{*ª1rXŒd…m»‰äcô¯–dâ•ã‘Jº¬§¨#¨® §,df«8ÉÅßN¾hˆ;îÓ=7áùpën®É 6ûJžO2^œÐò JÖø¥²ã›Ò6Ü·‰!wbÍ‚¬O©»õ¬ÿ ƒP=Ä:â¤-&ÙŽ ` È9 r9íϧzë> XÅ7ƒ5X–krÑ¢L 7€ìw}ÑŸNHëŒüþ:2†á¼+u·á÷N/Û'Ðç~ߘô«ëh!ónRéeQ´6QÛÿ èEwëÅÒ|¸Yqó1uêyùzð8 ƒŠù¦Ò;¹ä6öi<'ü³„[íZhu½ ùÍ¡g‚>r¯׊îÌx}bñ2“­k꣧oø~›hTèóËWò4|ki"xßQ˜Ï6øÀLnß‚0 ¹Æ{±–¶Öe#¨27È@^Ìß.1N¾œyç€õ†ñeé·Õã†çQ°€=­Ì©ºB€Ø8<‚ÃSõ®ùcc>×Ú .Fr:žÝGæ=kÁâ,^!Fž ¬,àµ}%¶«îõ¹†"r²ƒGœüYÕd?aÑÍY®49PyU ÷þ!žxÅm|/‚ãNð˜¼PcûTÒ,¹/Ý=FkÏ|u¨¶«â녏{¤m¢]Û¾ïP>®XãÞ½iÓÁ¾ ‰'¬–6ß¼(„ï— í!úÙäzôë^–:œ¨å|,_¿&š×]uÓѵÛô4’j”bž§x‘Æ©ã›á,‚[Ô ÎÞ= ŒËæ ÀùYÁ?ŽïÚ¼?ÁªxºÕÛ,°1¸‘¿ÝäãØ¯v…@¤åq½ºã œàûââ·z8Xýˆþz~—û»™âµj=Ž â~ãáh@'h¼F#·Üp?ŸëQü-løvépx»cŸø…lxâÃûG·‰¶ø”L£©%y?¦úõÆü-Õ¶¥y`Òl7>q’2üA?•F}c‡jB:¸Jÿ +§¹¿¸Q÷°ív=VÑìu[Qml%R7a×IèTõéŽx¬ ?†š7 1†îã-ˆã’L¡lŽ0OÓ=ÅuˆpÇ•¼3ÛùÒ¶W/!|’wŽw^qÔ×Ïaó M8Q¨ãÑ?ëï0IEhÄa¸X•`a ?!ÐñùQ!Rä ÂžqŽžÝO`I0ÿ J“y|ñ!Îã@99>þ8–+éáu…!ù—ä ʰ<÷6’I®z ÅS„¾)Zþ_Öýµ×ËPåOwø÷þ*üïænÖùmØÝûþ¹=>¦½öî×Jh]¼ç&@§nTŒ6IT Àõ^Fxð7Å3!Ö·aÛ$þÿ ¹ã5îIo:ȪmËY[’8ÇӾlj*òû¢¥xõ¾¼ú•åk+\ð¯ HÚoŽl•Ûk,¯ ç²²cõÅ{²Z\ ´ìQ åpzŽ3Ôð}ÿ Jð¯XO¡øÎé€hÙ¥ûLdŒ`““ù6Gá^ÃáÝ^Ë[Ñb¾YåŒÊ»dŽ4 †2§,;ÿ CQÄ´¾°¨c–±”mºV{«ßÕýÄW\ÖŸ‘çŸ,çMRÆí“l-ƒn~ë©ÉÈê Ü?#Ž•¹ðãSÒ¥ÐWNíà½;ãž)™ÎSÈ9cóLj뵿Å«iÍk¨ió­¶X‚7÷ƒ€yãnyÏŽëÞ Öt`×À×V's$È9Ú:ä{wÆEk€«†Çàc—â$éÎ.éí~Ýëk}ÅAÆpörÑ¢‡Šl¡ÑüSs‹¨‰IÝ„óÀ×wñ&eºðf™pŒÆ9gŽTø£lñëÀçŽ NkÊUK0U’p ï^¡ãÈ¥´ø{£ÙHp`’ØåbqÏ©äó^Æ: Ž' ÊóM«õz+ß×ó5Ÿ»('¹­ð¦C„$˜Å¢_ºÈI?»^äã'ñêzž+ë€ñ-½»´}¡Ë*õ?.xÇ^1ŽMyǸ&“—L–îëöâ7…' bqéÎGé]˪â1$o²¸R8Ã`.q€}sÖ¾C9­8cêÆÞíïóòvÓòùœÕfÔÚéýu­èÖ·Ú Å‚_¤³ÜۺƑߝ”àרý:׃xPþÅÕî-/üØmnQìïGΊÙRqê=>¢½õnæ·r!—h`+’;ò3È<“Û©éšóŸx*÷V¹¸×tÈiˆßwiÔÿ |cŒñÏ®3Ö½̰‰Ë Qr©ö½®¼ÛoÑÙZÅÑ«O൯ýw8;k›ÿ x†;ˆJa;‘º9÷÷R+¡ñgŽí|Iáë{ôáo2ʲ9 029ÉÏLí\‰¿¸Ÿb˜ "Bv$£&#ßiê>=ªª©f  ’N ëí>¡N­XW­~5×úíø\‰»½Ï^ø(—wÖú¥¤2íŽÞXæÁ$ °eÈ888^nÝë²ñÝÔ^ ÖÚ9Q~Ëå7ï DC¶ÑµƒsËÇè9®Wáþƒ6‡£´·°2\Ý:ÈÑ?(#¨'$õèGJ¥ñW\ÿ ‰E¶—¸™g˜ÌÀ¹;Pv ú±ÎNs·ëŸ’–"Ž/:té+ûË]öJöÓM»ëø˜*‘•^Uý—êd|‰åñMæÔÝ‹23å™6æHùÛ‚ëüñ^…ñ1¢oêûÑEØ.õ7*ÅHtÎp{g<·Á«+¸c¿¿pÓ¾Æby=8É_ÄsÆk¬ñB\jÞÔì••Ë[9Píb‹Bヅ =9­3§ð§LšÛáÖšÆæXÌÞdÛP.0\ãïÛ0?™úJ¸™Ë ”•œº+=<µI£¦í¯õêt¬d‹T¬P=ËFêT>ÍØØ@Ï9<÷AQÌ×»Õ¡xùk",JÎæù±Éç$œŽŸZWH®¯"·UÌQ ’ÙÈ]ÅXg<ã ߨg3-Üqe€0¢¨*Œ$܃ ’Sû 8㎼_/e'+Ï–-èÓ¶¶Õíß[·ÙÙ½î쏗¼sk%§µxä‰â-pÒeÆCrú ôσžû=”šÅô(QW‚Õd\ƒæ. \àö¹¯F½°³½0M>‘gr÷q+œ¶NïºHO— ¤ ܥݭ”n·J|ÆP6Kµc=Isó}Ò çGš)a=—#vK›åoK§ßóٍ¤¶¿õú…ÄRÚ[Ësöټˏ•Ë ópw®qœŒ·Ø ùÇâ‹ý‡ãKèS&ÞvûD Aù‘É9 ŒîqÅ} $SnIV[]ѐ´Ó}ØÜ¾A Ü|½kÅþÓ|E Mu R¼.I¼¶däò‚ÃkÆ}ðy¹vc iUœZ…­Õõ»z¾÷¿n¦*j-É­/àœHã\y5 Û ß™ó0— äŸnzôã#Ô¯,†¥ÚeÔ÷ÜÅ´„“'c…<íÝ€<·SŠ¥k§Ã¢éÆÆÙna‚8–=«ʪ[Ÿ™°pNî02z“ÔÙ–K8.È’Þî(vƒ2®@ äÈûãçžxäÇf¯ˆu¹yUÕîýWšÙ|›ëÒ%Q^í[æ|éo5ZY•^{96ˆY‚§v*x>âº_|U¹Ö´©tûMÒÂ9PÇ#«£#€ éÉñ‘ƒÍz/‰´-į¹°dd,Б›p03ƒœ{ç9=+ Ûᧇ¬¦[‡‚ê婺¸#±ß=³ý¿•Õµjñ½HÙh›Û[§ÚýÊöô÷{˜?ô÷·Ô.u©–_%còcAÀ˜’ }0x9Î>žñÇáÍ9,ahï¦Ì2òÓ ñÛAäry$V²Nð ]=$Ž ‚#Ù‚1ƒƒødõMax‡ÂÖ^!±KkÛ‘ «“Çó²FN8+ëÎ{Ò¼oí§[«ÕMRoËeç×[_m/¦¦k.kôgŽxsSÓ´ý`êzªÜÜKo‰cPC9ÎY‰#§^üý9¹âïÞx£Ë·Ú`±‰‹¤;³–=ÏaôÕAð‚÷kêÁNBéÎælcõö®£Fð†ô2Ò¬]ßÂK$ÓÜ®•”/ÊHàã$ä ¸÷ëf¹Oµúâ“”’²ø­è´µþöjçNü÷üÌ¿ xNïFÒd»¼·h®îT9ŽAµÖ>qÁçÔœtïÒ»\ȶÎîcÞäîó3¶@#ÉIÎ ÔñW.<´’¥–ÑÑ€ÕšA‚ ;†qÓë‚2q ÒÂó$# Çí‡ !Ë}Õ9ÈÎÑÉã=;ŒÇÎuñ+ÉûÏ¥öíeÙ+$úíÜ娯'+êZH4ƒq¶FV‹gïŒ208ÆÌ)íб>M|÷âÍã¾"iì‹¥£Jd´™OÝç;sÈúr+ÜäˆË)DŒ¥šF°*3Õ”d {zÔwºQ¿·UžÉf†~>I+ŒqÔ`ð3œ“Ü×f]œTÁÔn4“ƒø’Ýßõ_«*5šzGCÊ,þ+ê1ò÷O¶¸cœºb2yÇ;cùÕ£ñh¬›áÑŠr¤ÝäNBk¥—á—†gxšX/쑘hŸ*Tçn =û㦠2|(ð¿e·ºÖ$ ýìŸ!'åΰyîî+×öœ=Y:²¦ÓÞ×iü’—ü -BK™£˜›âÆ¡&véðõ-ûÉY¹=Onj¹ø¯¯yf4·±T Pó`çœ7={×mÃ/ ¢˜ZÚòK…G½¥b„’G AãÜœ*í¯Ã¿ IoæI¦NU8‘RwÈã;·€ Û×ëÒ”1Y •£E»ÿ Oyto¢<£Áö·šï,䉧ûA¼sû»Nò}¹üE{ÜÖªò1’õÞr0â}ÎØ#>à/8ïéÎ~—áÍ#ñÎlí§³2f'h”?C÷YËdð:qëõÓ·‚ïeÄ© ÔÈØÜRL+žAÎ3¼g=åšó³Œt3 ÑQ¦ùRÙßE®¼±w_;þhš’Sirÿ ^ˆã¼iੇ|RòO„m°J/“$·l“ ÇÓ¿ÿ [ÑŠÆ“„†Õø>cFÆ6Ø1ƒ– àz7Ldòxäüwá‹ÝAXùO•Úý’é®ähm­ •NÀ±ÌTÈç ƒ‘I$pGž:‚ÄbêW¢®œ´|­¦­nÍ>¶ÖÏ¢§ÎÜ¢ºö¹•%ÄqL^öÛ KpNA<ã¡ …î==ª¸óffËF‡yÌcÉ ©ç$ð=ñÏ­YþÊ’Ú]—¥‚¬‚eDïÎH>Ÿ_ÌTP™a‰ch['çÆÜò7a‡?w°Ïn§âÎ5”’¨¹uÚÛ|´ÓÓc§{O—ü1•ªxsÃZ…ÊÏy¡Ã3¸Ë2Èé» ‘ƒÎ äžÜðA§cáOéúÛ4ý5-fŒï„ù¬ûô.Ç Üsž•Ò¾•wo<¶Ÿ"¬¡º|£ î2sÇ¡éE²ÉFѱrU°dÜ6œ¨ mc†Îxë׺Þ'0²¡Rr„{j¾í·è›µ÷)º·å–‹î2|I®Y¼ºÍË·–ÃÆà㍣'óÆxƒOÆÞ&>\lóÌxP Xc¸ì Sþ5§qà/ê>#žÞW¸if$\3 ® ûÄ“ùŽÕê¾ð<Ó‹H¶óÏ" å·( á‘€:ã†8Ï=+ꨬUA×ÃËÚT’ÑÞöù¥¢]{»ms¥F0\ÑÕ—ô}&ÛB´ƒOŽÚ+›xíÄÀ1 ,v± žIëíZ0ǧ™3 í2®0ทp9öÝÔž)ÓZËoq/Ú“‘L ²ŒmùŽÓ9§[Û#Ä‘\ÞB¬Çs [;à à«g‚2ôòªœÝV§»·¯/[uó½õÛï¾ /šÍ}öüÿ «=x»HŸÂÞ.™ ÌQùŸh´‘#a$‚'¡u<Š›Æ>2>+ƒLSiöwµFó1!eg`£åœ ÷ëÛö}Á¿ÛVÙêv $¬ƒ|,s÷z€ð΃¨x÷ÅD\ÜŒÞmåÔ„ ˆ o| :{ÇÓ¶–òÁn!´0Ål€, ƒ ( ÛŒŒ c¶rsšæ,4‹MÛOH!@¢ ÇŽ„`å²9ÝÃw;AÍt0®¤¡…¯ØÄ.Àì클ƒ‘ßñ5Í,Óëu-ÈÔc¢KÃÓ£òÖ̺U.õL¯0…%2È—"~x ‚[`có±nHàŽyàö™¥keˆìŒÛFç{(Ø©†`Jã#Žwg<“:ÚÉ;M ^\yhûX‡vB·÷zrF?§BÊÔ/s<ÐÈB)Û± ·ÍÔwç5Âã:så§e{mѤï«Òíh—]Wm4âí¿ùþW4bC3¶ª¾Ùr$ pw`àädzt!yŠI„hÂîàM)!edŒm'æ>Ç?wzºK­ìcŒ´¯Ìq6fp$)ãw¡éUl`µ»ARAˆÝÕgr:äŒgƒéé[Ôö±”iYs5Ýï«ÙG—K=þF’æMG«óÿ `ŠKɦuOQ!ÕåŒ/ÎGÞ`@ËqÕzdõâ«Ê/Ö(ƒK´%ŽbMü åÜŸö—>¤óŒŒV‘°„I¢Yž#™¥ùÏÊ@8 œgqöö5ª4vד[¬(q cò¨À!FGaÁõõ¯?§†¥ÏU½í¿WªZ$úyú½Žz×§Éþ?>Ã×È•6°{™™ŽÙ.$`­ÎUœ…çè ' ¤r$1Ø(y7 ðV<ž:È  ÁÎMw¾Â'Øb§øxb7gãО½óÉÊë²,i„Fȹ£§8ãä½k¹¥¦ê/ç{ïê驪2œ/«ü?¯Ô›ìñÜ$þeýœRIåŒg9Ác’zrrNO bÚi¢ ѺË/$,“ª¯Ýä;Œ× ´<ÛÑn³IvŸb™¥ nm–ÄŸ—nÝÀãŽ3ëÍG,.öó³˜Ù£¹u ÊÌrŠ[<±!@Æ:c9ÅZh ì’M5ÄìÌ-‚¼ëÉùqŽGì9¬á ;¨A-ž—évþÖ–^ON·Ô”ŸEý}ú×PO&e[]ÒG¸˜Ûp ƒÃà/Ë·8ûÀ€1ž@¿ÚB*²­¼ñì8@p™8Q“žÆH'8«I-%¸‚ F»“åó6°Uù|¶Ú¸ã ò^Äw¥ŠÖK–1ÜÝK,Žddlí²0PÀü“×ükG…¯U«·¶–´w¶ŽÍ¾©yÞú[Zös•¯Á[™6° ¨¼ÉVæq·,# ìãï‘×8îry®A››¨,ãc66»Ë´ã'æÉù?t}¢æH--Òá"›|ˆ¬[í  7¶ö#¸9«––‹$,+Ëqœ\Êø c€yê^ݸÄa°«™B-9%«×®‹V´w~vÜTéꢷþ¼ˆ%·¹• ’[xç•÷2gØS?6åÀÚ õ9É#š@÷bT¸º²C*3Bá¤òÎA9 =úU§Ó"2Ãlá0iÝIc‚2Î@%öç94ùô»'»HÄ¥Ô¾@à Tp£šíx:úÊ:5eºßMý×wµ›Ó_+šº3Ýyvÿ "ºÇ<ÂI>Õ 1G·Ë«È«É# àÈÇ øp Jv·šæDûE¿›†Ë’NFr2qŸ½ÇAÜšu•´éí#Ħ8£2”Ú2Ã/€[ÎTr;qŠz*ý’Îþ(≠;¡TÆâ›;ºÿ àçœk‘Þ­8¾Uª¾íé{^×IZéwÓkXÉûÑZo¯_øo×È¡¬ â–ÞR§2„‚Àœü½ùç® SVa†Âüª¼±D‘ŒísŸàä|ä2 æ[‹z”¯s{wn„ÆmáóCO+†GO8Ïeçåº`¯^¼ðG5f{Xžä,k‰<á y™¥voÆ éÛõëI=œ1‹éíÔÀÑ)R#;AÂncäŽ:tÏ#¶TkB.0Œ-ÖÞZÛgumß}fÎJÉ+#2êÔP£žùÈÅi¢%œ3P*Yƒò‚Aì“Ž2r:ƒÐúñi­RUQq‰H9!”={~¼ “JŽV¥»×²m.ÛߺiYl¾òk˜gL³·rT• ’…wHÁ6ä`–Î3ùÌ4Øe³†&òL‘•%clyîAÂäà0 žüç$[3uŘpNOÀÉ=† cï{rYK ååä~FÁ •a»"Lär1Ó¯2Äõæ<™C•.fÕ»è¥~½-¿g½Â4¡{[ør¨¶·Žõäx¥’l®qpwÇ»8ärF \cޏܯÓ-g‚yciÏÀ¾rÎwèØÈ#o°Á9ã5¢šfÔxÞæfGusÏÌJÿ µ×œ/LtãÅT7²¶w,l ɳ;”eúà·¨çîŒsÜgTÃS¦­^ '~‹®›¯+k÷ZÖd©Æ*Ó[Ü«%Œk0ŽXƒ”$k#Ȩ P2bv‘ƒŸáÇ™ÆÕb)m$É*8óLE‘8'–ÜN Úyàúô­+{uº±I'wvš4fÜr íì½=úuú sFlìV$‘ö†Hсù€$§ õ=½¸«Ž] :Ž+•¦ïmRþ½l´îÊT#nkiøÿ _ðÆT¶7Ò½ºÒ£Î¸d\ã8=yãŽÜäR{x]ZâÚé#¸r²#»ÎHÆ6õ ç® ÎFkr;sºÄ.&;só± Ç9êH÷ýSšÕ­tÐU¢-n­ Ì| vqœ„{gŒt§S.P‹’މ_[;m¥Þ­ZýRûÂX{+¥úü¼ú•-àÓ7!„G"“´‹žƒnrYXã¸îp éœ!Ó­oP̏tÑ (‰Þ¹é€sÓ#GLçÕšÑnJý¡!‘Tä#“ß?îýp}xÇ‚I¥Õn#·¸–y'qó@r[ Êô÷<ÔWÃÓ¢áN¥4ԝ’I&ݼ¬¬¼ÞºvéÆ FQV~_ÒüJÖÚt¥¦Xá3BÄP^%ÈÎW-×c¡ú©¤·Iþèk¥š?–UQåIR[’O 5x\ÉhÆI¶K4«2ùªŠŒ<¼óœçØ`u«‚Í.VHä € Ëgfx''9ÆI#±®Z8 sISºku¢ßÞ]úk»Jößl¡B.Ü»ÿ MWe °·Ž%šêɆ¼»Âù³´œ O¿cÐÓÄh©"ÛÜÏ.ÖV ’3nüÄmnq[ŒòznšÖ>J¬òˆæ…qýØP Ž:ä7^0yëWšÍ_79äoaÈ °#q0{ää×mœy”R{vÒÞ¶ÚÏe¥“ÚÆÐ¥Ì®—õýjR •íç›Ìb„+J yÜØÙ•Ç]¿Ôd þËOL²”9-Œ—õÃc'æÝלçÚ²ìejP“½ âù°¨†ðqòädЃÉäÖÜj÷PÇp“ÍšŠå«‘î <iWN­smª»¶vÓz5»ûì:Rs\Ðßôû×uÔÿÙ