Skip to content

Commit f422f00

Browse files
Corrections to README
1 parent 6350725 commit f422f00

File tree

1 file changed

+12
-6
lines changed

1 file changed

+12
-6
lines changed

README.rst

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -139,8 +139,14 @@ US/Eastern time zone.
139139

140140
So assuming the date was 2015-01-01, we would be saving the following values to
141141
the database:
142-
``LocationReportingPeriod.start``: ``datetime.datetime(2015, 1, 1, 0, 0, tzinfo=<DstTzInfo 'US/Eastern' EST-1 day, 19:00:00 STD>)``
143-
``LocationReportingPeriod.end``: ``datetime.datetime(2015, 1, 1, 23, 59, 59, 999999, tzinfo=<DstTzInfo 'US/Eastern' EST-1 day, 19:00:00 STD>)``
142+
143+
.. code-block:: python
144+
145+
# LocationReportingPeriod.start
146+
datetime.datetime(2015, 1, 1, 0, 0, tzinfo=<DstTzInfo 'US/Eastern' EST-1 day, 19:00:00 STD>)
147+
148+
# LocationReportingPeriod.end
149+
datetime.datetime(2015, 1, 1, 23, 59, 59, 999999, tzinfo=<DstTzInfo 'US/Eastern' EST-1 day, 19:00:00 STD>)
144150
145151
For each location, let's say that the client wants to see the start and end of
146152
the reporting period in that location's time zone. One thing to remember is that
@@ -149,11 +155,11 @@ particular time zone, it does not mean that they will come that way from the
149155
database. For example, if your application's settings.TIME_ZONE is set to
150156
``UTC``, you would get back:
151157

152-
.. code block:: python
153-
158+
.. code-block:: python
159+
154160
print(period.start)
155161
datetime.datetime(2015, 1, 1, 5, 0, tzinfo=<UTC>)
156-
162+
157163
print(period.end)
158164
datetime.datetime(2015, 1, 2, 4, 59, 59, 999999, tzinfo=<UTC>)
159165
@@ -187,7 +193,7 @@ Here is how we would handle the displaying conversions from view to template:
187193
.. code-block:: django
188194
189195
{% load tz %}
190-
{% load i81n %}
196+
{% load i18n %}
191197
192198
{% block content %}
193199
<table>

0 commit comments

Comments
 (0)