mirror of
https://github.com/django/django.git
synced 2025-11-02 04:48:33 +00:00
Added support for time zones. Thanks Luke Plant for the review. Fixed #2626.
For more information on this project, see this thread:
cf0423bbb8
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17106 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
01f70349c9
commit
9b1cb755a2
58 changed files with 2720 additions and 284 deletions
|
|
@ -4,6 +4,7 @@ import time
|
|||
|
||||
from django.utils.dateformat import format
|
||||
from django.utils import dateformat, translation, unittest
|
||||
from django.utils.timezone import utc
|
||||
from django.utils.tzinfo import FixedOffset, LocalTimezone
|
||||
|
||||
|
||||
|
|
@ -56,7 +57,6 @@ class DateFormatTests(unittest.TestCase):
|
|||
self.assertEqual(datetime.fromtimestamp(int(format(dt, 'U')), ltz).utctimetuple(), dt.utctimetuple())
|
||||
|
||||
def test_epoch(self):
|
||||
utc = FixedOffset(0)
|
||||
udt = datetime(1970, 1, 1, tzinfo=utc)
|
||||
self.assertEqual(format(udt, 'U'), u'0')
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue