954,560 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Database Dates and encoding: mass frustration

Hi everubody!

I have a huge issue with dates and encoding in my database.

Two weeks ago I restored a database from an Xcloner copy to my site, since then all problems are there.

My site language is Spanish, and I was using in Wordpress define('DB_CHARSET', 'UTF8');
Since then if I put utf8 nothing works,if I put define('DB_CHARSET', ''); site works more or less fine. The major problem is that I use a plugin that stores DATEs to work and now all dates are simply 1970 00:00:00

Database encoding is utf8,everything is exactly as it was before, but i'm having this ·$%·%&$·" problem and I really don't know waht can I do to fix it, any suggestion?

bipies
Light Poster
35 posts since Jun 2011
Reputation Points: 10
Solved Threads: 0
 

Can you post your work? If you echo the date from the plugin, does it come out normal? Also, check myphpadmin or use navicat to check if the field is a time or varchar.

fobos
Posting Whiz in Training
297 posts since Feb 2009
Reputation Points: 29
Solved Threads: 52
 

Hi:

Can't echo the result cos I dont know where in the plugin it stores the data and the pluginss is huge :( (but can try to search something)

I lookes at and the table / cell is datestamp :/

Something else?

bipies
Light Poster
35 posts since Jun 2011
Reputation Points: 10
Solved Threads: 0
 

Found this

//build start date		
		if ($post_frequency_start_date==date('Y-m-d'))
		{
			$post_frequency_start_date = '0000-00-00 00:00:00';
		}
		else
		{
			$time = date('H:i:s');
			$post_frequency_start_date = "$post_frequency_start_date $time";
		}
bipies
Light Poster
35 posts since Jun 2011
Reputation Points: 10
Solved Threads: 0
 

i read on another forum that they removed the define('DB_CHARSET', 'UTF8'); from there page and it worked.

http://wordpress.org/support/topic/multilanguage-blog-icelandic-japanese-english-spanish

fobos
Posting Whiz in Training
297 posts since Feb 2009
Reputation Points: 29
Solved Threads: 52
 

Yes. I know and I did it, the page without utf8 works, but the plugin problem `persists :(

bipies
Light Poster
35 posts since Jun 2011
Reputation Points: 10
Solved Threads: 0
 

If you open your databse, are all the dates 1970 00:00:00? Can you post more code then what you posted. Its kinda hard from just seeing a fragment of what you have.

fobos
Posting Whiz in Training
297 posts since Feb 2009
Reputation Points: 29
Solved Threads: 52
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You
View similar articles that have also been tagged: