/servertime command returns additional spaces.

Issue #349 resolved
Edward Hart-Davis created an issue

The /servertime command returns additional spaces, between the month and the day.

servertime1.PNG

Comments (5)

  1. Anna Bakker

    /servertime just calls date, which for me showed Wed 2 Mar 05:20:16 GMT 2016, oddly with Mar and 2 around the other way, but the space still before 2.

    This looks like it only happens with single digit dates, in this case 2

  2. Riot

    Yes of course, but date has a format string. If one isn't specified it uses a default one which is dictated by your locale.

    The solution is simply to specify the desired format string. In this case the monospace-friendly digit space padding is not desired

  3. Anna Bakker

    Looks like it isn't as easy as adding the format string straight into the exec config with date. Exec doesn't seem to like \ or quotation there (results are as if it ignored quotation and turns \ into \\)

    Could make a tiny script that uses date with the format string, if there is no other way to do it how it currently uses date in the config.

    The format string would be +"%a %b %-d %H:%M:%S %Z %Y" for the current format but without the space (Fri Mar 25 10:09:25 GMT 2016)

    Or +"%A, %B %-d %H:%M:%S %Y (%Z)" for a different format returning Friday, March 25 10:08:42 2016 (GMT)

  4. Log in to comment