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

Ignore timezone when tracking #3516

Merged
merged 1 commit into from
Jan 29, 2025
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 .github/workflows/process.yml
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ jobs:
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}
- name: Download tracking data
run: git clone git@github.com:timothy-nunn/process-tracking-data.git process-tracking-data
- name: Download large tokamak MFILE
- name: Download MFILEs
uses: actions/download-artifact@v4
with:
name: tracked-mfiles
Expand Down
6 changes: 4 additions & 2 deletions tracking/tracking_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,8 @@ def __init__(
self.add_extra_metadata("commit_hash", commit_hash)

if database:
date = self.tracking_file.meta.get("date").replace("/", "")
# split to remove timezone from date if present
date = self.tracking_file.meta.get("date").replace("/", "").split(" ")[0]
time = self.tracking_file.meta.get("time")

# for an mfile called foo.MFILE.DAT created at 16:00 on 15/11/2021
Expand Down Expand Up @@ -353,7 +354,8 @@ def _add_variables(self, json_file_data):
title = metadata.get("title", "-")
message = metadata.get("commit_message", "-")
hash_ = metadata.get("commit_hash", "-")
date_str = metadata.get("date", "-")
# split to disregard timezone if present
date_str = metadata.get("date", "-").split(" ")[0]
time_str = metadata.get("time", "-")

# common format for the timestamp of the run
Expand Down
Loading