[wp-hackers] Re: "WP Queries - a short review"

Martin Geisler mgeisler at mgeisler.net
Mon Jun 6 11:26:03 GMT 2005

Per Søderlind <per at soderlind.no> writes:

> Ludo has written an interesting article on WP DB layout and queries; it's
> worth reading (and commenting?): 
> http://lightpress.org/post/wp-queries-a-short-review 

On the topic of the table schemas for WordPress, could someone explain
to me why the posts has both a post_date and post_date_gmt field?

Having just the GMT time and an offset stored should be enough, or is
this for the case where you move from, say, Europe to USA and then
still want the posts to retain their local time? If so, then each post
ought to have a timezone associated with it. This would be cleaner and
more explicit.

Making a rule out of always dealing with timestamps as UTC is so much
better in the long run. Then only convert them into a local time on

Having them as integers (what time() returns) is even better for it's
so easy to do calculations on integers --- much easier than processing
your string with regular expressions like in get_gmt_from_date() in

Martin Geisler                                     GnuPG Key: 0x7E45DD38

PHP EXIF Library      |  PHP Weather             |  PHP Shell
http://pel.sf.net/    |  http://phpweather.net/  |  http://mgeisler.net/
Read/write EXIF data  |  Show current weather    |  A shell in a browser
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 188 bytes
Desc: not available
Url : http://comox.textdrive.com/pipermail/wp-hackers/attachments/20050606/edab2eeb/attachment.bin

More information about the wp-hackers mailing list