modrzew / pokeminer

Pokemon location scraper
MIT License
220 stars 62 forks source link

Converting the time format #259

Open ghost opened 7 years ago

ghost commented 7 years ago

How would one convert the date/time format used here into a more readable value, like dd/mm/yyy hh:mm:ss?

Aiyubi commented 7 years ago

I feel the need to post this: https://xkcd.com/1179/

But just look where it is used and edit those parts yourself? It is just in the reports where it tells you the start and endlich time?

ghost commented 7 years ago

I'm going to have a look at the code today. I'm not very handy with python, so what I'd like to do is have it dump the time in a more easy to read format into the db so I can do queries and whatnot from there. I'll prob have to pull all my sightings, convert what I have and re-import them into a new table using the datetime data type or something, but we'll see.

For instance, I'd like to be able to query for a specific pkmon, order by spawn point and time sighted so I could have a better idea of when to go where.

modrzew commented 7 years ago

@Corinos you don't need to touch pokeminer's code to do what you want. You can convert timestamp into readable date using just SQL - for example, using MySQL's FROM_UNIXTIME function. See more in MySQL docs.