WordPress UTC Friendly

In WordPress, when you’re writing an article, then the date and time when you save the article was going to be stored in two separate columns. First, the date and time in UTC format (post_date_gmt), and the second one is date and time in a format that appropriate with time zone you specify in the General Settings of your WordPress (post_date). For example, if you are using “UTC+7″ time zone setting in the General Settings of your WordPress, and you write and save an article on June 2, 2011 at 09:33:34 AM, then the column format of UTC (post_date_gmt) would be “2011-06-04 02:33:43″, whereas in column which has format suitable to the time zone “UTC+7″ (post_date) would be “2011-06-04 09:33:43″.

The same thing would be happened when you modify an article. The date and time when you modify will be stored also in two separate columns with the columns that stores the date and time data when you first saved the articles for the very first time. Both modification date and time columns are also respectively in UTC format (post_modified_gmt) and the other one is in format that appropriate with the time zone setting in the General Settings of your WordPress (post_modified). For example, if you are using “UTC+7″ time zone setting in the General Settings of your WordPress, and then you modify and save again that article in that example above on June 4, 2011 at 10:15:24 AM, then the value that would be stored in the column which has format of UTC (post_modified_gmt) would be “2011-06-04 03:15:24″, whereas the value that would be stored in column which has format suitable to that time zone “UTC+7″ (post_modified) would be “2011-06-04 10:15:24″.

What is UTC?

  1. UTC stands for Universal Time Coordinated.
  2. UTC was devised by the International Telecommunication Union (ITU) to mitigate confusion arising from the use of several different time-keeping standards.
  3. The reason it became UTC instead of CUT was that the French abbreviation would have been TUC, so UTC was decided upon as a compromise between the English and French abbreviations. As a result of the re-arrangment, UTC is often usually referred to as Universal Coordinate Time.

What is GMT?

  1. GMT stands for Greenwich Mean Time, is a term originally referring to mean solar time at the Royal Observatory in Greenwich, London. It is arguably the same as Coordinated Universal Time (UTC) and when this is viewed as a time zone the name Greenwich Mean Time is especially used by bodies connected with the United Kingdom, such as the BBC World Service, the Royal Navy, the Met Office and others.
  2. GMT is the time at the Prime Meridian, line of longitude, which runs through Greenwich (near London) from the north to the south pole. All other lines of longitude are, of course, either east or west of Greenwich and therefore ahead or behind in real time. Places in Spain, however, despite being on the prime meridian choose not to take GMT but to be an hour ahead with other western European countries.

Conclusion: WordPress allows you to define your time as an offset from Universal Coordinated Time (UTC), so that all the time-related elements stored in the database are stored as GMT (Greenwich Mean Time) values, which is a universal standard. Among other things, this helps you display the correct time on your weblog, even if your host server is located in a different time zone.

This post is also available in: Indonesian

Speak Your Mind

*