Skip to content

Commit

Permalink
Merge pull request #435 from deathtenk/incorrect_timezone
Browse files Browse the repository at this point in the history
Incorrect timezone
  • Loading branch information
gilesknap committed Jul 2, 2023
2 parents a631449 + d8479a1 commit 8881b77
Showing 1 changed file with 2 additions and 1 deletion.
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

0 comments on commit 8881b77

Please sign in to comment.