I get “The PHP Date/Time library is not supported by your web host.” on my CentOS host, what library to I need to install to add support?

Upgrade to PHP 5.2 or above The Error Message you see is by WordPress. It’s very misleading what it basically saying is, that you need a PHP version >= 5.2 for that feature to work. Please look into your operating systems documentation or contact technical support on how to update your PHP version. For CentOS, … Read more

How to check for WordPress timezone type?

If we want to work with php’s datetime features and timezone objects AND handle sites that use a gmt_offset, sadly it does require some trickery. I have not found a better way to do it than this: Check for timezone string first – got one – great! Else Check for gmt offset, then try to … Read more

Is it safe to use ‘date_default_timezone_set’ in plugin file?

http://codex.wordpress.org/Function_Reference/get_gmt_from_date Replace all instances of get_the_date or the_date with echo get_gmt_from_date(get_the_date(‘Y-m-d H:i:s’)). That’s not a quick fix, it’s a way to fix your sitemaps. EDIT: WordPress SEO runs it’s raw dates from MySQL through a WP function called mysql2date, which in turn calls date_i18n. date_i18n happens to have a handy filter which you can tie … Read more

Trigger a cron every 24h GMT -8

Almost, WP Cron jobs do not run at specific times, they are approximate, and all timestamps should be UTC, as WordPress always deals in UTC timestamps. If you want midnight PST, you’ll want to specify 8PM UTC. Also for example, your above code suggests midnight PST, but it may not run at midnight PST. If … Read more

Date, Time, and Timezones

What is the purpose of the timezone setting in the Admin -> Settings section? Since WordPress handles time zone on its own (separately from native PHP functionality) that is where the setting made and result is stored in options. Whenever anything that works with timezones needs to happen, the time zone setting is retrieved and … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)