Yii Framework Forum: YII 1.X After login how to change timezone - Yii Framework Forum

Jump to content

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

YII 1.X After login how to change timezone Rate Topic: -----

#1 User is offline   manocreative 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 17
  • Joined: 12-December 13

Posted 22 June 2017 - 12:44 PM

Dear Friends,

Can you please any help me..YII 1.X after login how to change timezone overall application based on database table.I tried setTimeZone but its not working.

I tried after login YII::app()->setTimeZone but this also not working.
0

#2 User is offline   Patrick Jones 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 495
  • Joined: 14-July 12
  • Location:Berlin

Posted 22 June 2017 - 11:36 PM

Quote

but its not working


How so? What is your expected result and what is actually happening?
Freelance developer for hire - send me a message!
0

#3 User is offline   manocreative 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 17
  • Joined: 12-December 13

Posted 22 June 2017 - 11:49 PM

View PostPatrick Jones, on 22 June 2017 - 11:36 PM, said:

How so? What is your expected result and what is actually happening?



Thanks for your reply Jones,

Actually my requirement is after login timezone changed overall application.Timezone retrieved from database table. Login time i set YII::app()->user->setTimeZone(); But overall application its timezone not changed.Can you please help me how to change overall application same timezone. Otherwise after login how to set timezone in config main.php file.
0

#4 User is offline   Patrick Jones 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 495
  • Joined: 14-July 12
  • Location:Berlin

Posted 23 June 2017 - 08:14 AM

Please post the code of how you set the timezone and then how you output a date. Use "code" tags.
Freelance developer for hire - send me a message!
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