• In the German support forums a user asked how he could localize the date and time format used for the display of comments. I looked into template comments.php and saw, that currently in line 30 a fixed format is hard coded into the template:

    <?php echo esc_html(comment_time('g:i a')); ?><?php echo " - "; echo esc_html(comment_date('M j, Y'));?>

    The result is, that e.g. in German the output gets rendered in US-American date and time formats. The localization settings (Settings > General) are disregarded:

    Screenshot

    Solution would be to provide comment_time() and comment_date() without a preset format:

    <?php echo esc_html(comment_time()); ?><?php echo " - "; echo esc_html(comment_date());?>

    which then renders according to the localization settings, e.g.

    Ver?ffentlicht am 18:39 – 26. Februar 2018

    (the translation isn’t quite perfect yet and should read

    Ver?ffentlicht: 18:39 – 26. Februar 2018

    instead)

Viewing 1 replies (of 1 total)
  • Theme Author spicethemes

    (@spicethemes)

    Thank you very much for mentioning this, we have fixed this bug and released the version 1.6.3.1.

    Closing this discussion!!!

Viewing 1 replies (of 1 total)
  • The topic ‘Providing fix date and time format disregards localization’ is closed to new replies.