diff --git a/freezegun/api.py b/freezegun/api.py index 81d4da17..bfa44378 100644 --- a/freezegun/api.py +++ b/freezegun/api.py @@ -385,7 +385,7 @@ def timestamp(self): def now(cls, tz=None): now = cls._time_to_freeze() or real_datetime.now() if tz: - result = tz.fromutc(now.replace(tzinfo=tz)) + cls._tz_offset() + result = tz.fromutc(now.replace(tzinfo=tz)) else: result = now + cls._tz_offset() return datetime_to_fakedatetime(result) diff --git a/tests/test_operations.py b/tests/test_operations.py index 303a1dc8..6f7b9a77 100644 --- a/tests/test_operations.py +++ b/tests/test_operations.py @@ -66,7 +66,7 @@ def test_datetime_timezone_real(): @freeze_time("2012-01-14 2:00:00", tz_offset=-4) def test_datetime_timezone_real_with_offset(): now = datetime.datetime.now(tz=GMT5()) - assert now == datetime.datetime(2012, 1, 14, 3, tzinfo=GMT5()) + assert now == datetime.datetime(2012, 1, 14, 7, tzinfo=GMT5()) assert now.utcoffset() == timedelta(0, 60 * 60 * 5)