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

Explicitly set startTime #288

Open
micheljung opened this issue Apr 18, 2017 · 7 comments
Open

Explicitly set startTime #288

micheljung opened this issue Apr 18, 2017 · 7 comments
Labels

Comments

@micheljung
Copy link
Member

The server needs to set game_stats.startTime explicitly. See FAForever/db#83

@micheljung
Copy link
Member Author

Not required for v0.8 as we just go with the insert time of the database, for now-

@micheljung micheljung removed this from the v0.8 milestone May 8, 2017
@Rackover
Copy link
Member

Is this still relevant ? It is true that the game record lacks a createTime, and therefore has a startTime with a similar functionality - and that therefore the server should set the start time manually.
But if the result is the same, how important is that issue ?

@KaukaHan
Copy link
Contributor

Is this somthing to be worked on ? It sounds like somthing easy to do for a newbie. i can look into this.

@Askaholic
Copy link
Collaborator

Yea this could still be done. It would allow us to move the game_stats insertion somewhere else if we wanted. Just gotta beware of timezone issues.

@KaukaHan
Copy link
Contributor

KaukaHan commented Dec 2, 2021

would it be a good idea to get the time in on_game_launched method put it into a variable like self.startTime to be used in update_game_stats ?
and is it ok to use sql_now since endTime uses it too ?

@Askaholic
Copy link
Collaborator

Yea that would be the way to go. Create a variable and use the built in datetime.now function to create a timezone aware date time object. Then I think you can just use that variable in the insert and sqlalchemy should figure out how to convert it to the correct database timestamp.

@Askaholic
Copy link
Collaborator

If you do the same thing for end time then at some point we can combine the end of game database updates into a single update statement.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants