Skip to content

Commit

Permalink
Fix timestamps in store objects
Browse files Browse the repository at this point in the history
  • Loading branch information
Nikita-Barabanov committed Aug 18, 2023
1 parent 686b77e commit fd85291
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
5 changes: 2 additions & 3 deletions hworker/check/runtime.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,8 @@
import io
import os
import platform
import time
import subprocess
from datetime import date
from datetime import datetime
from math import isclose
from itertools import zip_longest
from typing import Iterator
Expand Down Expand Up @@ -120,7 +119,7 @@ def check_wo_store(checker: Check, solution: Solution, check_num: int = 0) -> Ch
ID=checker.ID + solution.ID,
USER_ID=solution.USER_ID,
TASK_ID=solution.TASK_ID,
timestamp=date.fromtimestamp(time.time()),
timestamp=datetime.now().timestamp(),
rating=content,
category=checker.category,
stderr=stderr,
Expand Down
4 changes: 2 additions & 2 deletions hworker/check/validate.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from ..config import get_check_directory, get_validator_name, get_version_validator_name

import time
from datetime import date
from datetime import datetime
from importlib import import_module


Expand Down Expand Up @@ -53,7 +53,7 @@ def validate_wo_store(validator: Check, solution: Solution, check_num: int = 0)
ID=validator.ID + solution.ID,
USER_ID=solution.USER_ID,
TASK_ID=solution.TASK_ID,
timestamp=date.fromtimestamp(time.time()),
timestamp=datetime.now().timestamp(),
rating=result,
category=validator.category,
stderr=stderr,
Expand Down

0 comments on commit fd85291

Please sign in to comment.