mirror of
https://github.com/Mikaela/Limnoria.git
synced 2025-02-04 16:44:11 +01:00
utils.time: Add support for timezones without a slash.
eg. UTC, CET, ...
This commit is contained in:
parent
ed9dffdd7f
commit
e223b507dd
@ -96,6 +96,7 @@ class TimeTestCase(PluginTestCase):
|
||||
def testTztime(self):
|
||||
self.assertNotError('tztime Europe/Paris')
|
||||
self.assertNotError('tztime America/Indiana/Knox')
|
||||
self.assertNotError('tztime UTC')
|
||||
self.assertError('tztime Europe/Gniarf')
|
||||
|
||||
@skipIf(not has_dateutil, 'python-dateutil is missing')
|
||||
|
@ -41,7 +41,7 @@ try:
|
||||
except ImportError:
|
||||
pytz = None
|
||||
|
||||
_IANA_TZ_RE = re.compile("([\w_-]+/)+[\w_-]+")
|
||||
_IANA_TZ_RE = re.compile("([\w_-]+/)*[\w_-]+")
|
||||
|
||||
class TimezoneException(Exception):
|
||||
pass
|
||||
|
Loading…
Reference in New Issue
Block a user