Clarify comments in git-show recipe
This commit is contained in:
@@ -44,8 +44,8 @@ Show all files in commit
|
|||||||
Produce something like a ``git show`` message
|
Produce something like a ``git show`` message
|
||||||
======================================================================
|
======================================================================
|
||||||
|
|
||||||
In order to display timezone information you have to create a subclass of
|
In order to display time zone information you have to create a subclass
|
||||||
tzinfo as described in the `Python datetime documentation`_::
|
of tzinfo as described in the `Python datetime documentation`_::
|
||||||
|
|
||||||
from datetime import tzinfo, timedelta
|
from datetime import tzinfo, timedelta
|
||||||
class FixedOffset(tzinfo):
|
class FixedOffset(tzinfo):
|
||||||
@@ -58,10 +58,10 @@ tzinfo as described in the `Python datetime documentation`_::
|
|||||||
return self.__offset
|
return self.__offset
|
||||||
|
|
||||||
def tzname(self, dt):
|
def tzname(self, dt):
|
||||||
return None
|
return None # we don't know the time zone's name
|
||||||
|
|
||||||
def dst(self, dt):
|
def dst(self, dt):
|
||||||
return timedelta(0) # dealing with DST would be too complicated
|
return timedelta(0) # we don't know about DST
|
||||||
|
|
||||||
.. _Python datetime documentation: https://docs.python.org/2/library/datetime.html#tzinfo-objects
|
.. _Python datetime documentation: https://docs.python.org/2/library/datetime.html#tzinfo-objects
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user