We got lots of email and message asking about how to change the time zone and date format on my website. Today, via this blog post we are going to share you about customizing time zone and date format for your WordPress website.
Every time while posting a post in WordPress, it will automatically publish it based on the default format. With the help of available setting on the dashboard, you can easily change the format of date and time. Here are some basic steps that you need to follow to change the date and time format in WordPress.
Change the Time Zone and Date Format from the Dashboard
Inside the general section of settings, you will get the option to change the time zone and date format. Here are the steps,
- At first, login to your WordPress website
- Go to admin dashboard > Settings > General
- Scroll down to the date format section
- You will see 5 different types of date format there
- Select the required date format.
- From the time format section, you can select the required format
- If the selection is fine, you can click on Save Changes below.
After doing this, your post date and time format will be changed. If the available settings are not feasible for you, you can select the custom time and date format. Here are some examples of making the custom format as you need.
Format string examples for time
l, F j, Y
What do you mean by the above strings?
- l = It means the full name of the week ( Example:- Sunday )
- F = Full name for the month. ( Example:- January )
- j = The day of the month.
- Y = The year in 4 digits. (If you put lower-case y, then it gives the year’s last 2 digits)
If you put the above format in the Custom Section your date format will appear like as shown below.
Sunday, January 02, 2019
Some examples of Date Format
According to the Codex, here are 11 different types of date format examples.
F j, Y g:i a– April 6, 2019 12:50 am
F j, Y– April 6, 2019
F, Y– April, 2019
g:i a– 12:50 am
g:i:s a– 12:50:48 am
l, F jS, Y– Saturday, April 6th, 2019
M j, Y @ G:i– April 6, 2019 @ 0:50
Y/m/d \a\t g:i A– 2019/04/06 at 12:50 AM
Y/m/d \a\t g:ia– 2019/04/06 at 12:50am
Y/m/d g:i:s A– 2019/04/06 12:50:48 AM
Based on the above examples, you can customize the date format easily. Moreover, you can also alter the format with the help of the above strings as well.
Examples of Time Format
Likewise, customizing time the format is also easy via this method. Some examples of time format customization are shown below.
- g:i a – 7:15 am
- g:i A – 7:15 AM
- H:I – 7:15
Here, when you put g:i a then, the time format will be 7:15 am. Similarly, when you enter g:i A then the format will appear like 7:15 AM.
With the help of the above examples, you can also customize the time format in WordPress website. Before customizing, you can check the available options first.
In the end, first, make sure which time zone you are based on Time and Date format are usually vary based on the location. You can check the Time and Date of the respected location before setting the time and date format.
Do not hesitate to comment us below if you have any queries or suggestions.