Timezones / Collation

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
facets
Forum Contributor
Posts: 273
Joined: Wed Apr 13, 2005 1:53 am
Location: Detroit

Timezones / Collation

Post 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]
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

Can you define "weird date issues" more specifically? What code are you using that generated that warning?

I use UTF-8 everywhere.
facets
Forum Contributor
Posts: 273
Joined: Wed Apr 13, 2005 1:53 am
Location: Detroit

Post 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./
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post 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.
Post Reply