Skip to content

Commit

Permalink
date fix
Browse files Browse the repository at this point in the history
  • Loading branch information
TiagoTAlves committed Apr 10, 2024
1 parent de5963c commit fe2e6ba
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions runnumber-rest/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
]

import os
from datetime import datetime
import datetime as dt

import flask
from flask_restful import Api, Resource
Expand Down Expand Up @@ -124,7 +124,7 @@ def get(self, runNum):
run = None
with db.session.begin():
run = db.session.query(RunNumber).filter_by(rn=runNum).one()
run.stop_time = datetime.utcnow()
run.stop_time = dt.datetime.utcnow()
print(f"updateStopTimestamp: result {[run.start_time, run.stop_time]}")
return flask.make_response(flask.jsonify([[[run.start_time, run.stop_time]]]))
except Exception as err_obj:
Expand Down
2 changes: 1 addition & 1 deletion runregistry-rest/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ def get(self, runNum):
run = None
with db.session.begin():
run = db.session.query(RunRegistryMeta).filter_by(run_number=runNum).one()
run.stop_time = dt.datetime.utcnow
run.stop_time = dt.datetime.utcnow()
print(f"updateStopTimestamp: result {[run.start_time, run.stop_time]}")
return flask.make_response(flask.jsonify([[[run.start_time, run.stop_time]]]))
except Exception as err_obj:
Expand Down

0 comments on commit fe2e6ba

Please sign in to comment.