developer-relations icon indicating copy to clipboard operation
developer-relations copied to clipboard

Epoch time timestamp of the instant when the game timer was at 0:00.

Open chipimix opened this issue 6 years ago • 11 comments

Hi! Noob here :) I'm trying to get the timestamp in epoch time of the instant when the game timer was at 0:00. So far I've only been able to get the timestamp of when champion select ended and the loading screen appeared :( Is this possible? Thanks in advance!

chipimix avatar Feb 07 '19 12:02 chipimix

Hey there.

The game timer starts at 0. The champion select phase and the loading screen are not included. The timestamps should mirror the ingame timer.

Also, this is not a bug or issue with the Riot API. I recommend you get on the Discord, and ask your questions there: https://discord.gg/riotapi

Querijn avatar Feb 07 '19 12:02 Querijn

Thanks for the fast reply. I understand this. I can get the timestamps relative to the instant 0 - the game start. However I would also like to know the non-relative, epoch time of this start event. Is it possible?

chipimix avatar Feb 07 '19 12:02 chipimix

The start epoch is the game start. But I'm going on a limb here and assume you want to know when the game has started relative to Linux epoch, that's the gameCreation in /lol/match/v4/matches/, in milliseconds.

Querijn avatar Feb 07 '19 12:02 Querijn

yes you are correct! However gamecreation is relative to the loadingscreen appearing:

gameCreation | long | Designates the timestamp when champion select ended and the loading screen appeared, NOT when the game timer was at 0:00.

What I'm looking for is the loadingscreen ending and match start :)

chipimix avatar Feb 07 '19 12:02 chipimix

Just for clarity for the Rioters here: You'd like to know the duration of the loading screen.

Querijn avatar Feb 09 '19 07:02 Querijn

Adding the duration of the loading screen to the gameCreation long would be a workaround, Yes.

But to put it plainly I would say what I am looking is the following: Timestamp of when the game timer was at 0:00, NOT when champion select ended and the loading screen appeared.

Because, as far as I can tell, there is no way to know at what time of the day did any match event occurred.

Thanks again!

chipimix avatar Feb 09 '19 12:02 chipimix

Why would you like to see the exact time of the game start? I thought, as you mentioned above, you wanted to know the loading time duration.

Querijn avatar Feb 09 '19 12:02 Querijn

What I can tell you is, the property gameStartTime within the spectate active game endpoint is accurately the point of when the players actually appear within the game. But I don't know if you can find that elsewhere to process after a game has ended.

It also is only set after the loading screen ended (for obvious reasons), so trying to get it from an active game requires a bit caution/some retries too

Colorfulstan avatar Feb 10 '19 07:02 Colorfulstan

Why would you like to see the exact time of the game start? I thought, as you mentioned above, you wanted to know the loading time duration.

So that I can sync game events' data with other external data. As it stands, the API does not allow this to happen :(

chipimix avatar Feb 10 '19 13:02 chipimix

I want to +1 this request. I've been wanting to make an automatic highlights tool, and knowing the epoch time when the game actually starts is crucial. Right now that's impossible without using computer vision and analyzing the screen, which is pretty much a show-stopper for now.

jjmaldonis avatar Feb 10 '19 18:02 jjmaldonis

Same here +1 💯 on the request.

Sauraus avatar Feb 26 '19 18:02 Sauraus