fbpx
How to Show the Current Time in Local Language in WordPress

How to Show the Current Time in Local Language in WordPress

This snippet allows you to show the current local time, in the language the WordPress installation has been configured to use.

Instructions
Add this snippet in your theme files, where you want to show current time, localized.

<?php echo date_i18n('j F', time()); ?>

Relevant link: https://codex.wordpress.org/Formatting_Date_and_Time

WordPress Snippet Info

Tested with Wordpress v. 5.0
Last Modified: 05.03.2019
Last Reviewed: 05.03.2019

How to Show the Current Time in Local Language in WordPress
3 (60%) 37 vote[s]
Please report broken snippets.
Report Broken Snippet
WordPress Hosting - WP Engine

Recent Comments