Skip to content

Commit

Permalink
fix deprecation warning about datetime.fromutctimestamp()
Browse files Browse the repository at this point in the history
  • Loading branch information
PoByBolek committed Aug 7, 2024
1 parent bc35e7f commit c95ff03
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions graphene/tests/issues/test_1293.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# https://github.com/graphql-python/graphene/issues/1293

import datetime
from datetime import datetime, timezone

import graphene
from graphql.utilities import print_schema
Expand All @@ -9,11 +9,11 @@
class Filters(graphene.InputObjectType):
datetime_after = graphene.DateTime(
required=False,
default_value=datetime.datetime.utcfromtimestamp(1434549820776 / 1000),
default_value=datetime.fromtimestamp(1434549820.776, timezone.utc),
)
datetime_before = graphene.DateTime(
required=False,
default_value=datetime.datetime.utcfromtimestamp(1444549820776 / 1000),
default_value=datetime.fromtimestamp(1444549820.776, timezone.utc),
)


Expand Down

0 comments on commit c95ff03

Please sign in to comment.