Yii Framework Forum: Set Mysql Timezone Failed, Need Help!! - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Set Mysql Timezone Failed, Need Help!! Rate Topic: -----

#1 User is offline   Dan Din Dun 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 77
  • Joined: 09-February 10

Posted 25 March 2010 - 03:07 AM

Hi,

I get problem again when I try to sett mysql timezone:

here is my code:
Yii::app()->getDb()->createCommand("SET time_zone='Europe/Helsinki'")->execute();


the error is:
CDbCommand failed to execute the SQL statement: SQLSTATE[HY000]: General error: 1298 Unknown or incorrect time zone: 'Europe/Helsinki'SET time_zone='Europe/Helsinki'


I have try to change timezone value become 'Asia/Jakarta' or more I use this time zone(http://en.wikipedia....base_time_zones)

but still error like above.

maybe some one can point me how to fix this.

Thank you very much for everything

Regards,
DanDinDun
Thanks and Kind Regards
------
DanDinDun
0

#2 User is offline   Maurizio Domba Cerin 

  • Yii - Yesss It Is !!!
  • Yii
  • Group: Yii Dev Team
  • Posts: 4,359
  • Joined: 12-October 09
  • Location:Croatia

Posted 25 March 2010 - 04:16 AM

It's database instalation dependant... if you are using MySql try to run this command from phpMyAdmin for example to see the result...

Take a look here for the MySql documentation about timezone: http://dev.mysql.com...ne-support.html

it says: Named time zones can be used only if the time zone information tables in the mysql database have been created and populated.
Find more about me.... btw. Do you know your WAN IP?
0

#3 User is offline   Dan Din Dun 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 77
  • Joined: 09-February 10

Posted 25 March 2010 - 05:26 PM

View Postmdomba, on 25 March 2010 - 04:16 AM, said:

It's database instalation dependant... if you are using MySql try to run this command from phpMyAdmin for example to see the result...

Take a look here for the MySql documentation about timezone: http://dev.mysql.com...ne-support.html

it says: Named time zones can be used only if the time zone information tables in the mysql database have been created and populated.


oh it need database! ok sir it useful information :D he..he.. thanks
Thanks and Kind Regards
------
DanDinDun
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users