• Hi, When I chose Time Format for a Player Performance variable, the format is MM:SS (min:2 digit sec). My site is about Motorsports and since many pilots pass the finish line within the same second, we need more precise timings. Forza, the game my site is about uses this format: MM:SS.SSS (seconds with 3 decimal points). I know there might not be a setting for this within SportsPress plugin.

    1) Is there a way to change the time format by using PHP functions? Or maybe change the code of a core file if it can’t be done by a functions.php file, or any other way? If yes, could someone point me to the right direction to accomplish this please? Like an example of the function or what file and what code to edit?

    Thanks!

    • This topic was modified 7 years, 2 months ago by Checo. Reason: Forgot to select WP version
Viewing 1 replies (of 1 total)
  • Roch

    (@rochesterj)

    Hi!

    Thanks for reaching out once again. And thanks for creating different tickets for each of your issues ??

    This is possible via custom code, but unfortunately we can’t help you with that. That would be beyond the scope of our support.

    There are 3 approaches to this issue as far as I can see:
    1) Just changing the time format in the front-end, via JavaScript.
    2) Changing the time via PHP (probably what you were considering)
    3) Adding different fields for each element of your scoring system (one for minutes, one for seconds, one for milliseconds), and just displaying them in a way that the user won’t notice these as separated fields.

    Each appraoch has its own benefits. For a very quick deploy the first one would be a good idea, as you’d need very little custom code.

    Thanks!

Viewing 1 replies (of 1 total)
  • The topic ‘How to change variable time format from MM:SS to MM:SS.SSS’ is closed to new replies.