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
4 changes: 2 additions & 2 deletions apiserver/dora/service/code/sync/etl_github_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
)
from dora.store.repos.code import CodeRepoService
from dora.store.repos.core import CoreRepoService
from dora.utils.time import time_now
from dora.utils.time import time_now, ISO_8601_DATE_FORMAT

PR_PROCESSING_CHUNK_SIZE = 100

Expand Down Expand Up @@ -349,7 +349,7 @@ def _to_pr_commits(

@staticmethod
def _dt_from_github_dt_string(dt_string: str) -> datetime:
dt_without_timezone = datetime.strptime(dt_string, "%Y-%m-%dT%H:%M:%SZ")
dt_without_timezone = datetime.strptime(dt_string, ISO_8601_DATE_FORMAT)
return dt_without_timezone.replace(tzinfo=pytz.UTC)


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -168,9 +168,8 @@ def _get_repo_workflow_run_duration(

@staticmethod
def _get_datetime_from_gh_datetime(datetime_str: str) -> datetime:
return datetime.strptime(datetime_str, ISO_8601_DATE_FORMAT).astimezone(
tz=pytz.UTC
)
dt_without_timezone = datetime.strptime(datetime_str, ISO_8601_DATE_FORMAT)
return dt_without_timezone.replace(tzinfo=pytz.UTC)


def get_github_actions_etl_handler(org_id):
Expand Down