Skip to content

Commit

Permalink
Yet another fix related to daylight saving time...
Browse files Browse the repository at this point in the history
  • Loading branch information
pierre-24 authored and gustavi committed Nov 10, 2016
1 parent 56a4ef4 commit c92c0b6
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions zds/utils/templatetags/tests/tests_date.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

from django.test import TestCase
from django.template import Context, Template
from django.utils import timezone


class DateFormatterTest(TestCase):
Expand Down Expand Up @@ -109,10 +108,4 @@ def test_humane_time(self):
"{{ date_epoch | humane_time }}"
).render(self.context)

# Since ZdS is in Europe/Paris, hours can be 0 or 1
paris = timezone.pytz.timezone('Europe/Paris')
is_dst = paris.localize(datetime.now()).dst() == timedelta(0, 3600)

hour = 1 if is_dst else 0

self.assertEqual(tr, u"jeudi 01 janvier 1970 à 0{}h00".format(hour))
self.assertEqual(tr, u"jeudi 01 janvier 1970 à 01h00")

0 comments on commit c92c0b6

Please sign in to comment.