A fresh mix of code snippets and tutorials

Note about date and time

Just a quick note about how WordPress handles dates and times.

Update! WordPress 5.3 changes date/time functionality. Check out this post for more details and all the latest techniques.</update>

As of WordPress version 3.0, the date() and time() functions do not factor in timezones. This is to ensure maximum portability across server setups. This means that date() and time() return UTC time in WP 3 and beyond. To get the Unix timestamp with a timezone offset, write this:


Related Posts

Learn more

Digging Into WordPressWordPress Themes In DepthWizard’s SQL Recipes for WordPress