diff options
author | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2017-04-24 00:41:02 +0900 |
---|---|---|
committer | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2017-04-24 00:41:02 +0900 |
commit | 3a60e1eaeabda65e12140f6952e2275f263d1dd7 (patch) | |
tree | 398d0a3b60fcb7350a994f5068402e307a3d386e | |
parent | ea94d67bbf9d6e0da6396fd74c980084264d9839 (diff) | |
download | sphinx-git-1.6b1.tar.gz |
Lazy import babelv1.6b1
-rw-r--r-- | sphinx/util/__init__.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sphinx/util/__init__.py b/sphinx/util/__init__.py index 8064bc68a..d86882259 100644 --- a/sphinx/util/__init__.py +++ b/sphinx/util/__init__.py @@ -27,7 +27,6 @@ from collections import deque from six import text_type, binary_type, itervalues from six.moves import range from six.moves.urllib.parse import urlsplit, urlunsplit, quote_plus, parse_qsl, urlencode -from babel.dates import format_datetime from docutils.utils import relative_path from sphinx.errors import PycodeError, SphinxParallelError, ExtensionError @@ -622,6 +621,8 @@ def status_iterator(iterable, summary, color="darkgreen", length=0, verbosity=0, def epoch_to_rfc1123(epoch): """Convert datetime format epoch to RFC1123.""" + from babel.dates import format_datetime + dt = datetime.fromtimestamp(epoch) fmt = 'EEE, dd LLL yyyy hh:mm:ss' return format_datetime(dt, fmt, locale='en') + ' GMT' |