1
0
Fork 0
forked from github/pelican
pelican-theme/pelican
W. Trevor King 228fc82fc9 utils: Add some ISO 8601 forms to get_date()
Support the forms listed by the W3C [1].  I also removed the
'%Y-%d-%m' form, which can be confused with the '%Y-%m-%d' ISO form.
The new ISO forms can use 'Z' to designate UTC or '[+-]HHMM' to
specify offsets from UTC.  Other time zone designators are not
supported.

The '%z' directive has only been supported since Python 3.2 [2], so if
you're running Pelican on Python 2.7, you're stuck with 'Z' for UTC.
Conveniently, we get ValueErrors for both invalid directives and
data/format missmatches, so we don't need special handling for the 2.7
case inside get_date().

[1]: http://www.w3.org/TR/NOTE-datetime
[2]: http://bugs.python.org/issue6641
2013-06-11 22:53:21 -04:00
..
tests utils: Add some ISO 8601 forms to get_date() 2013-06-11 22:53:21 -04:00
themes Clean up and improve <head> of notmyidea theme 2013-04-23 06:51:22 -07:00
tools Encoding issue in pelican-quickstart. Fixes #904 2013-05-26 11:38:55 +01:00
__init__.py Replace settings.get(key) with settings[key] for default settings 2013-06-02 14:24:27 -04:00
contents.py Replace settings.get(key) with settings[key] for default settings 2013-06-02 14:24:27 -04:00
generators.py Replace settings.get(key) with settings[key] for default settings 2013-06-02 14:24:27 -04:00
log.py fix for issue #761: handle unicode correctly in summary for Markdown 2013-04-03 19:38:42 -04:00
paginator.py Port pelican to python 3. 2013-01-11 03:20:09 +01:00
readers.py Replace settings.get(key) with settings[key] for default settings 2013-06-02 14:24:27 -04:00
rstdirectives.py Port pelican to python 3. 2013-01-11 03:20:09 +01:00
server.py Adding a message for gracefully shutting down dev server 2013-03-19 12:15:58 +01:00
settings.py Replace settings.get(key) with settings[key] for default settings 2013-06-02 14:24:27 -04:00
signals.py Add a pages_generator_finalized signal. 2013-02-10 12:42:54 -08:00
urlwrappers.py Make tags and cats case insensitive. Fixes #704. 2013-05-03 17:37:45 +01:00
utils.py utils: Add some ISO 8601 forms to get_date() 2013-06-11 22:53:21 -04:00
writers.py Replace settings.get(key) with settings[key] for default settings 2013-06-02 14:24:27 -04:00