[wp-testers] mysql2date was broken in ajax context, is it still?

deliciousdays oliver.seidel at deliciousdays.com
Sat Mar 22 14:30:41 GMT 2008


I've been trying in vain to get mysql2date() showing properly localized 
month names in my ajax module.

Here is the complete line:   $date = mysql2date( 
get_option('date_format'), current_time('mysql') );

Including or not including "wp-config.php" doesn't make a difference the 
month name is always displayed in English.

Loading "locale.php" directly and assigning a custom "$wp_locale" via:

$wp_locale_custom =& new WP_Locale();

and consequently trying:    echo $wp_locale_custom->get_month(1);

DOES work! But that can't be the solution, unless I would copy and paste 
the complete mysql2date conversion calls...which is at best a kludge.

Will this finally be fixed in WP2.5 ?

Thanks
Oliver

***
deliciousdays.com / cforms <http://www.deliciousdays.com/cforms-plugin>




More information about the wp-testers mailing list