How to Adjust Date and Time in WordPress

Are you wondering how to adjust the date and time in WordPress? Let me assure you it’s a simple procedure that won’t take much of your time. But first, let’s look into the reasons someone is looking forward to setting the date and time of your WordPress website.

Why Adjust Date and Time in WordPress?

A user may have more than one reason to adjust the date and time in WordPress. You may need to change the date and time for your personal purposes or for the services that your business provides.

For instance, let’s say you have an international client who wants a certain date and time format followed on their website. Or, when you are pitching your ideas to a potential client, setting your milestones in a 24-hour format would surely up your chances of getting the deal sealed. Similarly, you might have just shifted to a certain location where a particular date format is used in official writing.

Your reason might be different from the rest, but you still want to adjust the date and time in WordPress. Don’t worry this guide will help you do that in no time at all.

How to Adjust the Time and Date in WordPress

The easiest way to change the time and date in WordPress is by changing the time zone. Therefore, let’s have a look at how to do so first.

Change the Timezone

Relocating an office is common these days. If one finds more clients and better services in another state or country, they would surely consider moving the office there. That is what you might have done too.

What’s left is to adjust the date and time in WordPress accordingly. The simplest way to adjust your time and date settings to that specific area is to select the relative time zone.

In order to adjust the time zone, log in to your WordPress dashboard first. From there on go to the Settings tab and select the General option from the menu; Settings > General.

settings general adjust date and time in wordpress

Then, you’ll need to scroll down a little on this page. Here, you’ll find Timezone settings with a drop-down menu. From the drop-down menu, you can select your desired city from a huge pile of famous cities.

For this demonstration, we have selected Los Angeles.

Adjust time zone relative to Coordinated Universal Time (UTC)

Well, you tried changing the timezone but the city you want to select isn’t there on the list. So are you going to quit? Nah. We got another trick up our sleeves.

What you are going to do is select your desired time zone through manual offsets relative to Coordinated Universal Time or UTC. Simply google your city name with UTC and you’ll get the desired offset.

timezone utc offset adjust date and time in wordpress

Now you are just one step away. After you have selected your desired time zone, you can simply click on the Save Changes button at the end of general Settings and the selected time zone will be followed thereafter. Isn’t it easier than you thought?

Change the Date format:

Now that you have learned how to adjust date and time in WordPress, let’s talk about making it a little bit user-friendly. So, let’s move ahead and change the date format.

Different countries follow their unique style of date format. Also, the date is always easy to understand if it is in your familiar format.

You might want to change it for yourself if some clients have asked you to follow a certain date format for their website. By default, WordPress displays the date in the format August 11, 2021. However, you can change it with various formats according to your liking in WordPress.

Let’s consider using only the numbers in your date format. It’s possible in just two clicks. Want to display only the week of the year? Not a problem. You can even find a new combination for your website in WordPress settings.

So, let’s start with the simpler settings.

You’ll see Date Format just below the time zone settings in general Settings. Here, you will find several preset date formats available to choose from. You will also see some characters along with the formats. Choose one from the bunch and hit Save Changes at the bottom of settings and we are good to go.

Now, the question is what if none of these options appeal to you. Are you stuck with these professional yet boring formats? NO is the answer.

Here, the characters you saw earlier come into play. If you want to customize the date formatting in WordPress, you’ll need to become familiar with the Format Characters listed below. They are just a small effort and you end up with a lot of choices.

You have the choice to display days in the following ways using the characters shown against each row:

1. Day Formats

There are several options on how you can display the days in the date format.

Days Explanation Display
d Day of the month, 2 digits with leading zeros 01 to 31
D A textual representation of a day, three letters Mon through Sun
j Day of the month without leading zeros 1 to 31
l (lowercase ‘L’) A full textual representation of the day of the week Sunday through Saturday
N Numeric representation of the day of the week 1 (for Monday) through 7 (for Sunday)
S English ordinal suffix for the day of the month, 2 characters st, nd, rd or th. Works well with j
w Numeric representation of the day of the week 0 (for Sunday) through 6 (for Saturday)
z The day of the year (starting from 0) 0      through 365

2. Weeks Formats

‘W’ can be used to display the week of the year in the date section:

Week Explanation Display
W Week number of year, weeks starting on Monday 42 (the 42nd week in the year)

3. Month Formats

There are several choices for displaying months as well.

Month Explanation Display
F A full textual representation of a month, such as January or March January through December
m Numeric representation of a month, with leading zeros 01 through 12
M A short textual representation of a month, three letters Jan through Dec
n Numeric representation of a month, without leading zeros 1 through 12
t Number of days in the given month 28 through 31

5. Year Formats

Lastly, the year also has its own tweaks to make it as per your choice.

Year Explanation Display
I Whether it’s a leap year 1 if it is a leap year, 0 otherwise.
o Week-numbering year. This has the same value as Y, except that if the week number (W) belongs to the previous or next year, that year is used instead. Examples: 1999 or 2003
Y A full numeric representation of a year, 4 digits Examples: 1999 or 2003
y A two-digit representation of a year Examples: 99 or 03

You can also find these characters in the “Documentation on date and time formatting” option just below the Date Format.

Once you are familiar with these characters, there is a box just below the available date formats. Now, enter the Custom input of string for format characters of your choice. You can try different combinations until you find the right one that suits your needs.

A preview is also provided to you to help you get the desired format.

custom characters adjust date and time in wordpress

You can simply input the characters in the desired format and the date in your required format will be displayed.

Here are some commonly used strings and their outputs for date formatting.

  • M d, Y – Nov 06, 2014
  • d M, Y – 06 Nov, 2014
  • F jS, Y – November 6th, 2014
  • l, F jS, Y – Thursday, November 6th, 2014
  • H:i:s – 21:26:12

After you have selected your date format, you can simply click on the Save Changes button at the end of General Settings and the new settings will be applied.

Change the Time Format:

Similar to the date formatting, time can also be displayed in the desired pattern. The time format can be adjusted as per the norm at your location or the requirement of your client for their work.

The Time Format setting is also available with the date format option and it is as simple as the other one. You can find almost every time format is being used in the world preset in the settings.

You just need to simply select the one which suits your requirements.

By default, WordPress displays the time as 3:27 pm.

Custom Time Format Characters

As mentioned earlier, your requirements will surely be fulfilled with the already available formats in the settings. But if your client’s interests are unique and there isn’t any option available for that, you can simply customize the time formatting using the time format characters listed below.

Time Explanation Display
a Lowercase Ante meridiem and Post meridiem am or pm
A Uppercase Ante meridiem and Post meridiem AM or PM
B Swatch Internet time 000 through 999
g 12-hour format of an hour without leading zeros 1 through 12
G 24-hour format of an hour without leading zeros 0 through 23
h 12-hour format of an hour with leading zeros 01 through 12
H 24-hour format of an hour with leading zeros 00 through 23
i Minutes with leading zeros 00 to 59
s Seconds with leading zeros 00 through 59
u Microseconds: Note that date () will always generate 000000 since it takes an integer parameter, whereas DateTime::format () does support microseconds if DateTime was created with microseconds. Example: 654321
v Milliseconds Example: 654

Time format characters are also available in the “Documentation on date and time formatting” option.

Below the already available time formats, there is a box for Custom input of a string of format characters for the time as well. You can simply input the characters in the desired format and the time in your required format will be displayed. You can preview the time formats just like the date formats as well.

custom characters time format adjust date and time in wordpress

After you have selected your desired time format, you can simply click on the Save Changes button at the end of General Settings and the new settings will be applied.

Conclusion:

Once you relocate or work for a foreign client, it is essential to adjust the date and time in WordPress. Since the date and time in WordPress are not changed with the system settings automatically, we need to adjust them manually if needed.

Also, you might find the date and time formats in WordPress a bit outdated or boring. So a modern date and time format is never a bad idea, right? It can even be helpful if you have an online store and you want to set a correct delivery date in WooCommerce for your product orders

In this post, we have learned that it is extremely easy to adjust the date and time in WordPress now. One can simply go to the settings menu and apply the desired changes within seconds. It just takes a few steps if you want to change your time zone or adjust the date and time. Just select your required time zone or date and time format in WordPress settings and save the changes. It’s as simple as that.

This guide will help you step by step in not only applying the changes already available in the settings menu but also trying new customization which you’ll surely love. Have you tried doing it on your own? Did this guide make your experience any better? Let us know in the comments.

In the meantime, here are some more of our guides if you want to further customize your WordPress website: