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?

Re: Database Dates and encoding: mass frustration 80 80

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.

Re: Database Dates and encoding: mass frustration 80 80

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?

Re: Database Dates and encoding: mass frustration 80 80

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";
		}
Re: Database Dates and encoding: mass frustration 80 80

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

Re: Database Dates and encoding: mass frustration 80 80

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.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.19 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.