Skip to content
This repository has been archived by the owner on Oct 4, 2024. It is now read-only.

Incorrect timezone #435

Merged
merged 4 commits into from
Jul 2, 2023
Merged
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
3 changes: 2 additions & 1 deletion src/gphotos_sync/authorize.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
from json import JSONDecodeError, dump, load
from pathlib import Path
from typing import List, Optional
from datetime import timezone

from google_auth_oauthlib.flow import InstalledAppFlow
from requests.adapters import HTTPAdapter
Expand Down Expand Up @@ -104,7 +105,7 @@ def authorize(self):
"refresh_token": flow.credentials.refresh_token,
"token_type": "Bearer",
"scope": flow.credentials.scopes,
"expires_at": flow.credentials.expiry.timestamp(),
"expires_at": flow.credentials.expiry.replace(tzinfo=timezone.utc).timestamp()
}

self.save_token(oauth2_token)
Expand Down