|
1 |
|
2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" |
|
3 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
|
4 |
|
5 <html xmlns="http://www.w3.org/1999/xhtml"> |
|
6 <head> |
|
7 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> |
|
8 <title>pyams_utils.timezone package — PyAMS User Guide 0.1.0 documentation</title> |
|
9 <link rel="stylesheet" href="_static/pyramid.css" type="text/css" /> |
|
10 <link rel="stylesheet" href="_static/pygments.css" type="text/css" /> |
|
11 <script type="text/javascript"> |
|
12 var DOCUMENTATION_OPTIONS = { |
|
13 URL_ROOT: './', |
|
14 VERSION: '0.1.0', |
|
15 COLLAPSE_INDEX: false, |
|
16 FILE_SUFFIX: '.html', |
|
17 HAS_SOURCE: true, |
|
18 SOURCELINK_SUFFIX: '.txt' |
|
19 }; |
|
20 </script> |
|
21 <script type="text/javascript" src="_static/jquery.js"></script> |
|
22 <script type="text/javascript" src="_static/underscore.js"></script> |
|
23 <script type="text/javascript" src="_static/doctools.js"></script> |
|
24 <link rel="index" title="Index" href="genindex.html" /> |
|
25 <link rel="search" title="Search" href="search.html" /> |
|
26 <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Neuton&subset=latin" type="text/css" media="screen" charset="utf-8" /> |
|
27 <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Nobile:regular,italic,bold,bolditalic&subset=latin" type="text/css" media="screen" charset="utf-8" /> |
|
28 <!--[if lte IE 6]> |
|
29 <link rel="stylesheet" href="_static/ie6.css" type="text/css" media="screen" charset="utf-8" /> |
|
30 <![endif]--> |
|
31 |
|
32 </head> |
|
33 <body> |
|
34 |
|
35 <div class="related" role="navigation" aria-label="related navigation"> |
|
36 <h3>Navigation</h3> |
|
37 <ul> |
|
38 <li class="right" style="margin-right: 10px"> |
|
39 <a href="genindex.html" title="General Index" |
|
40 accesskey="I">index</a></li> |
|
41 <li class="right" > |
|
42 <a href="py-modindex.html" title="Python Module Index" |
|
43 >modules</a> |</li> |
|
44 <li class="nav-item nav-item-0"><a href="index.html">PyAMS User Guide 0.1.0 documentation</a> »</li> |
|
45 </ul> |
|
46 </div> |
|
47 |
|
48 <div class="document"> |
|
49 <div class="documentwrapper"> |
|
50 <div class="bodywrapper"> |
|
51 <div class="body" role="main"> |
|
52 |
|
53 <div class="section" id="pyams-utils-timezone-package"> |
|
54 <h1>pyams_utils.timezone package<a class="headerlink" href="#pyams-utils-timezone-package" title="Permalink to this headline">¶</a></h1> |
|
55 <div class="section" id="module-pyams_utils.timezone"> |
|
56 <span id="module-contents"></span><h2>Module contents<a class="headerlink" href="#module-pyams_utils.timezone" title="Permalink to this headline">¶</a></h2> |
|
57 <dl class="function"> |
|
58 <dt id="pyams_utils.timezone.gmtime"> |
|
59 <code class="descclassname">pyams_utils.timezone.</code><code class="descname">gmtime</code><span class="sig-paren">(</span><em>value</em><span class="sig-paren">)</span><a class="headerlink" href="#pyams_utils.timezone.gmtime" title="Permalink to this definition">¶</a></dt> |
|
60 <dd><p>Convert datetime to GMT</p> |
|
61 <p>Value is assumed to be in GMT if no timezone is given</p> |
|
62 </dd></dl> |
|
63 |
|
64 <dl class="function"> |
|
65 <dt id="pyams_utils.timezone.localgmtime"> |
|
66 <code class="descclassname">pyams_utils.timezone.</code><code class="descname">localgmtime</code><span class="sig-paren">(</span><em>value</em><span class="sig-paren">)</span><a class="headerlink" href="#pyams_utils.timezone.localgmtime" title="Permalink to this definition">¶</a></dt> |
|
67 <dd><p>Convert datetime to GMT</p> |
|
68 <p>Value is assumed to be in server timezone if none is given</p> |
|
69 </dd></dl> |
|
70 |
|
71 <dl class="function"> |
|
72 <dt id="pyams_utils.timezone.tzinfo"> |
|
73 <code class="descclassname">pyams_utils.timezone.</code><code class="descname">tzinfo</code><span class="sig-paren">(</span><em>request=None</em><span class="sig-paren">)</span><a class="headerlink" href="#pyams_utils.timezone.tzinfo" title="Permalink to this definition">¶</a></dt> |
|
74 <dd><p>request to timezone adapter</p> |
|
75 <p>There is no easy way to get timezone from a request. |
|
76 This adapter assumes that the timezone is given by |
|
77 a registered utility…</p> |
|
78 </dd></dl> |
|
79 |
|
80 <dl class="function"> |
|
81 <dt id="pyams_utils.timezone.tztime"> |
|
82 <code class="descclassname">pyams_utils.timezone.</code><code class="descname">tztime</code><span class="sig-paren">(</span><em>value</em><span class="sig-paren">)</span><a class="headerlink" href="#pyams_utils.timezone.tztime" title="Permalink to this definition">¶</a></dt> |
|
83 <dd><p>Convert datetime to local timezone</p> |
|
84 <table class="docutils field-list" frame="void" rules="none"> |
|
85 <col class="field-name" /> |
|
86 <col class="field-body" /> |
|
87 <tbody valign="top"> |
|
88 <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>value</strong> (<em>datetime</em>) – input datetime; value is assumed to be in GMT if no timezone is given</td> |
|
89 </tr> |
|
90 </tbody> |
|
91 </table> |
|
92 </dd></dl> |
|
93 |
|
94 </div> |
|
95 <div class="section" id="submodules"> |
|
96 <h2>Submodules<a class="headerlink" href="#submodules" title="Permalink to this headline">¶</a></h2> |
|
97 <div class="section" id="module-pyams_utils.timezone.utility"> |
|
98 <span id="pyams-utils-timezone-utility-module"></span><h3>pyams_utils.timezone.utility module<a class="headerlink" href="#module-pyams_utils.timezone.utility" title="Permalink to this headline">¶</a></h3> |
|
99 <dl class="class"> |
|
100 <dt id="pyams_utils.timezone.utility.ServerTimezoneUtility"> |
|
101 <em class="property">class </em><code class="descclassname">pyams_utils.timezone.utility.</code><code class="descname">ServerTimezoneUtility</code><a class="headerlink" href="#pyams_utils.timezone.utility.ServerTimezoneUtility" title="Permalink to this definition">¶</a></dt> |
|
102 <dd><p>Bases: <code class="xref py py-class docutils literal"><span class="pre">persistent.Persistent</span></code>, <code class="xref py py-class docutils literal"><span class="pre">zope.container.contained.Contained</span></code></p> |
|
103 <dl class="attribute"> |
|
104 <dt id="pyams_utils.timezone.utility.ServerTimezoneUtility.timezone"> |
|
105 <code class="descname">timezone</code><a class="headerlink" href="#pyams_utils.timezone.utility.ServerTimezoneUtility.timezone" title="Permalink to this definition">¶</a></dt> |
|
106 <dd><p>Server timezone: Default server timezone</p> |
|
107 </dd></dl> |
|
108 |
|
109 </dd></dl> |
|
110 |
|
111 <dl class="class"> |
|
112 <dt id="pyams_utils.timezone.utility.TimezoneGenerationsChecker"> |
|
113 <em class="property">class </em><code class="descclassname">pyams_utils.timezone.utility.</code><code class="descname">TimezoneGenerationsChecker</code><a class="headerlink" href="#pyams_utils.timezone.utility.TimezoneGenerationsChecker" title="Permalink to this definition">¶</a></dt> |
|
114 <dd><p>Bases: <code class="xref py py-class docutils literal"><span class="pre">object</span></code></p> |
|
115 <p>Timezone generations checker</p> |
|
116 <dl class="method"> |
|
117 <dt id="pyams_utils.timezone.utility.TimezoneGenerationsChecker.evolve"> |
|
118 <code class="descname">evolve</code><span class="sig-paren">(</span><em>site</em>, <em>current=None</em><span class="sig-paren">)</span><a class="headerlink" href="#pyams_utils.timezone.utility.TimezoneGenerationsChecker.evolve" title="Permalink to this definition">¶</a></dt> |
|
119 <dd><p>Check for required utilities</p> |
|
120 </dd></dl> |
|
121 |
|
122 <dl class="attribute"> |
|
123 <dt id="pyams_utils.timezone.utility.TimezoneGenerationsChecker.generation"> |
|
124 <code class="descname">generation</code><em class="property"> = 1</em><a class="headerlink" href="#pyams_utils.timezone.utility.TimezoneGenerationsChecker.generation" title="Permalink to this definition">¶</a></dt> |
|
125 <dd></dd></dl> |
|
126 |
|
127 </dd></dl> |
|
128 |
|
129 <dl class="function"> |
|
130 <dt id="pyams_utils.timezone.utility.handle_new_local_site"> |
|
131 <code class="descclassname">pyams_utils.timezone.utility.</code><code class="descname">handle_new_local_site</code><span class="sig-paren">(</span><em>event</em><span class="sig-paren">)</span><a class="headerlink" href="#pyams_utils.timezone.utility.handle_new_local_site" title="Permalink to this definition">¶</a></dt> |
|
132 <dd><p>Create a new ServerTimezoneUtility when a site is created</p> |
|
133 </dd></dl> |
|
134 |
|
135 </div> |
|
136 <div class="section" id="module-pyams_utils.timezone.vocabulary"> |
|
137 <span id="pyams-utils-timezone-vocabulary-module"></span><h3>pyams_utils.timezone.vocabulary module<a class="headerlink" href="#module-pyams_utils.timezone.vocabulary" title="Permalink to this headline">¶</a></h3> |
|
138 <dl class="class"> |
|
139 <dt id="pyams_utils.timezone.vocabulary.TimezonesVocabulary"> |
|
140 <em class="property">class </em><code class="descclassname">pyams_utils.timezone.vocabulary.</code><code class="descname">TimezonesVocabulary</code><span class="sig-paren">(</span><em>*args</em>, <em>**kw</em><span class="sig-paren">)</span><a class="headerlink" href="#pyams_utils.timezone.vocabulary.TimezonesVocabulary" title="Permalink to this definition">¶</a></dt> |
|
141 <dd><p>Bases: <code class="xref py py-class docutils literal"><span class="pre">zope.schema.vocabulary.SimpleVocabulary</span></code></p> |
|
142 <p>Timezones vocabulary</p> |
|
143 </dd></dl> |
|
144 |
|
145 </div> |
|
146 </div> |
|
147 </div> |
|
148 |
|
149 |
|
150 </div> |
|
151 </div> |
|
152 </div> |
|
153 <div class="sphinxsidebar" role="navigation" aria-label="main navigation"> |
|
154 <div class="sphinxsidebarwrapper"> |
|
155 <h3><a href="index.html">Table Of Contents</a></h3> |
|
156 <ul> |
|
157 <li><a class="reference internal" href="#">pyams_utils.timezone package</a><ul> |
|
158 <li><a class="reference internal" href="#module-pyams_utils.timezone">Module contents</a></li> |
|
159 <li><a class="reference internal" href="#submodules">Submodules</a><ul> |
|
160 <li><a class="reference internal" href="#module-pyams_utils.timezone.utility">pyams_utils.timezone.utility module</a></li> |
|
161 <li><a class="reference internal" href="#module-pyams_utils.timezone.vocabulary">pyams_utils.timezone.vocabulary module</a></li> |
|
162 </ul> |
|
163 </li> |
|
164 </ul> |
|
165 </li> |
|
166 </ul> |
|
167 |
|
168 <div id="searchbox" style="display: none" role="search"> |
|
169 <h3>Quick search</h3> |
|
170 <form class="search" action="search.html" method="get"> |
|
171 <div><input type="text" name="q" /></div> |
|
172 <div><input type="submit" value="Go" /></div> |
|
173 <input type="hidden" name="check_keywords" value="yes" /> |
|
174 <input type="hidden" name="area" value="default" /> |
|
175 </form> |
|
176 </div> |
|
177 <script type="text/javascript">$('#searchbox').show(0);</script> |
|
178 </div> |
|
179 </div> |
|
180 <div class="clearer"></div> |
|
181 </div> |
|
182 <div class="related" role="navigation" aria-label="related navigation"> |
|
183 <h3>Navigation</h3> |
|
184 <ul> |
|
185 <li class="right" style="margin-right: 10px"> |
|
186 <a href="genindex.html" title="General Index" |
|
187 >index</a></li> |
|
188 <li class="right" > |
|
189 <a href="py-modindex.html" title="Python Module Index" |
|
190 >modules</a> |</li> |
|
191 <li class="nav-item nav-item-0"><a href="index.html">PyAMS User Guide 0.1.0 documentation</a> »</li> |
|
192 </ul> |
|
193 </div> |
|
194 <div class="footer" role="contentinfo"> |
|
195 © Copyright 2017, Thierry Florac. |
|
196 Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.6.5. |
|
197 </div> |
|
198 </body> |
|
199 </html> |