]> git.ipfire.org Git - thirdparty/babel.git/commitdiff
Renamed `LOCAL` to `LOCALTZ`.
authorChristopher Lenz <cmlenz@gmail.com>
Tue, 12 Jun 2007 20:09:35 +0000 (20:09 +0000)
committerChristopher Lenz <cmlenz@gmail.com>
Tue, 12 Jun 2007 20:09:35 +0000 (20:09 +0000)
babel/messages/catalog.py
babel/messages/pofile.py
babel/util.py

index 8e3b9fbc3cca0997b4613ffb38372ee19bf951c1..c7a1d5f8334c81afaf5142f89f9bfb41fbc848bd 100644 (file)
@@ -24,7 +24,7 @@ import time
 from babel import __version__ as VERSION
 from babel.core import Locale
 from babel.messages.plurals import PLURALS
-from babel.util import odict, LOCAL, UTC
+from babel.util import odict, LOCALTZ, UTC
 
 __all__ = ['Message', 'Catalog']
 __docformat__ = 'restructuredtext en'
@@ -136,14 +136,14 @@ class Catalog(object):
         self.charset = charset or 'utf-8'
 
         if creation_date is None:
-            creation_date = datetime.now(LOCAL)
+            creation_date = datetime.now(LOCALTZ)
         elif isinstance(creation_date, datetime) and not creation_date.tzinfo:
-            creation_date = creation_date.replace(tzinfo=LOCAL)
+            creation_date = creation_date.replace(tzinfo=LOCALTZ)
         self.creation_date = creation_date #: creation date of the template
         if revision_date is None:
-            revision_date = datetime.now(LOCAL)
+            revision_date = datetime.now(LOCALTZ)
         elif isinstance(revision_date, datetime) and not revision_date.tzinfo:
-            revision_date = revision_date.replace(tzinfo=LOCAL)
+            revision_date = revision_date.replace(tzinfo=LOCALTZ)
         self.revision_date = revision_date #: last revision date of the catalog
 
     def headers(self):
index 5e9c6a3b7a648643e9fd479a74dceeb1e6375570..135cd2660f66e0a017e38f77c699166fba97e8bf 100644 (file)
@@ -28,7 +28,7 @@ import textwrap
 
 from babel import __version__ as VERSION
 from babel.messages.catalog import Catalog
-from babel.util import LOCAL
+from babel.util import LOCALTZ
 
 __all__ = ['escape', 'normalize', 'read_po', 'write_po', 'write_pot']
 
@@ -418,7 +418,7 @@ def write_po(fileobj, input_fileobj, locale_obj, project='PROJECT',
     inlines = input_fileobj.readlines()
     outlines = []
     in_header = True
-    _date = datetime.now(LOCAL)
+    _date = datetime.now(LOCALTZ)
     for index in range(len(inlines)):
         if in_header:
             if '# Translations template' in inlines[index]:                
index 455b984bd0e8574c1432e1eab2d3cedf6e55d2d5..06c3a1e3fe2be5276970aec02caa802299569e84 100644 (file)
@@ -18,7 +18,7 @@ import os
 import re
 import time
 
-__all__ = ['pathmatch', 'relpath', 'UTC', 'LOCAL']
+__all__ = ['pathmatch', 'relpath', 'UTC', 'LOCALTZ']
 __docformat__ = 'restructuredtext en'
 
 def pathmatch(pattern, filename):
@@ -204,4 +204,8 @@ class LocalTimezone(tzinfo):
         tt = time.localtime(stamp)
         return tt.tm_isdst > 0
 
-LOCAL = LocalTimezone()
+LOCALTZ = LocalTimezone()
+"""`tzinfo` object for local time-zone.
+
+:type: `tzinfo`
+"""