Page 1 of 1

Timezones / Collation

Posted: Sat Oct 14, 2006 2:13 am
by facets
Hi All,

Does anyone have any suggestions or good web sources on setting timezones and the correct uses of Colloation?
I'm currently using "latin1_swedish_ci" as it was the default when creating the database. But am having weird date issues since upgrading to MySQL5/PHP5.

Can anyone suggest the 'best' collation/charset for a fairly basic web interface used for invoicing/statements in a closed intranet environment?
Or is like asking what car should I drive?

I've been prompted to looking down this patch as i've turned 'strict' error reporting on and am getting the following error :
PHP Strict Standards: date() [<a href='function.date'>function.date</a>]: It is not safe to rely on the system's timezone settings. Please use the date.timezone setting, the TZ environment variable or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Asia/Jayapura' for 'CST/9.0/no DST' instead in /var/www/html/db/statements.php on line 47
tia, Will./[/quote]

Posted: Sat Oct 14, 2006 7:38 am
by feyd
Can you define "weird date issues" more specifically? What code are you using that generated that warning?

I use UTF-8 everywhere.

Posted: Sun Oct 15, 2006 6:44 am
by facets
OK.

I'm guessing that it's best to use utf8_unicode_ci instead of utf8_general_ci as it handles obscure characters 'better'. Would this matter with 'pure english'?
CREATE DATABASE `dbName` DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci;

On another note i'm getting the following error :
Strict Standards: var: Deprecated. Please use the public/private/protected modifiers in /var/www/html/db/lib/i_mysql.php on line 8

So is replacing 'var' with 'public' the best way to go?

Will./

Posted: Sun Oct 15, 2006 8:17 am
by feyd
facets wrote:I'm guessing that it's best to use utf8_unicode_ci instead of utf8_general_ci as it handles obscure characters 'better'. Would this matter with 'pure english'?
CREATE DATABASE `dbName` DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci;
It matters much less in most contexts of English.
facets wrote:On another note i'm getting the following error :
Strict Standards: var: Deprecated. Please use the public/private/protected modifiers in /var/www/html/db/lib/i_mysql.php on line 8

So is replacing 'var' with 'public' the best way to go?

Will./
Public is the equivalent in PHP 5, technically speaking.