Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: remove pytz dependency #78

Merged
merged 1 commit into from Aug 13, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 1 addition & 3 deletions google/cloud/runtimeconfig/variable.py
Expand Up @@ -38,8 +38,6 @@
import base64
import datetime

import pytz

from google.api_core import datetime_helpers
from google.cloud.exceptions import Conflict, NotFound
from google.cloud.runtimeconfig._helpers import variable_name_from_full_name
Expand Down Expand Up @@ -218,7 +216,7 @@ def update_time(self):
value = DatetimeNS.from_rfc3339(value)
naive = value.tzinfo is None or value.tzinfo.utcoffset(value) is None
if naive:
value = pytz.utc.localize(value)
value = value.astimezone(tz=datetime.timezone.utc)
return value

def _require_client(self, client):
Expand Down