1
0
Fork 0
forked from github/pelican
pelican-theme/pelican/tests
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
..
content Markdown summary should not include content footnote 2013-05-10 03:50:33 -04:00
output Update tests output with feedgenerator 1.6 2013-06-02 16:21:10 +02:00
TestPages Move the tests into pelican. Fix #500 2013-03-06 00:41:27 -08:00
__init__.py Fix for issue #392 2013-03-27 18:17:11 -04:00
default_conf.py Move the tests into pelican. Fix #500 2013-03-06 00:41:27 -08:00
support.py tests.support: Use kwargs overrides in get_settings() 2013-06-02 14:24:27 -04:00
test_contents.py tests.support: Use kwargs overrides in get_settings() 2013-06-02 14:24:27 -04:00
test_generators.py Replace settings.get(key) with settings[key] for default settings 2013-06-02 14:24:27 -04:00
test_importer.py Import wordpress pages to pages/ subdir with --dir-page option 2013-04-19 23:06:59 +01:00
test_pelican.py add feedback to user and refactor 'autoreload' code 2013-04-19 13:35:20 -04:00
test_readers.py Replace settings.get(key) with settings[key] for default settings 2013-06-02 14:24:27 -04:00
test_settings.py settings: Make DEFAULT_CONFIG public 2013-06-02 13:32:10 -04:00
test_utils.py utils: Add some ISO 8601 forms to get_date() 2013-06-11 22:53:21 -04:00