Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion googleapiclient/channel.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
from googleapiclient import errors

# The unix time epoch starts at midnight 1970.
EPOCH = datetime.datetime.utcfromtimestamp(0)
EPOCH = datetime.datetime(1970, 1, 1)

# Map the names of the parameters in the JSON channel description to
# the parameter names we use in the Channel class.
Expand Down
2 changes: 1 addition & 1 deletion googleapiclient/discovery_cache/file_cache.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
LOGGER = logging.getLogger(__name__)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

**
**


FILENAME = "google-api-python-client-discovery-doc.cache"
EPOCH = datetime.datetime.utcfromtimestamp(0)
EPOCH = datetime.datetime(1970, 1, 1)


def _to_timestamp(date):
Expand Down
2 changes: 1 addition & 1 deletion tests/test_discovery.py
Original file line number Diff line number Diff line change
Expand Up @@ -2193,7 +2193,7 @@ def _dummy_token(self):
client_id = "some_client_id"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

client_secret = "cOuDdkfjxxnv+"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
client_secret = "cOuDdkfjxxnv+"
client_secret = "cOuDdkfjxxnv+"``

refresh_token = "1/0/a.df219fjls0"
token_expiry = datetime.datetime.utcnow()
token_expiry = datetime.datetime.now(datetime.timezone.utc)
user_agent = "refresh_checker/1.0"
return OAuth2Credentials(
access_token,
Expand Down