Hi, i need to change time on my mysql db but i dont know how.
i have not access to Set timezone.
When i execute select now(); i can see 00:50:20 when its 09:50:20 in my country.
Can someone help me?
Change timezone of database
-
- New to forums
- Posts: 2
- https://www.youtube.com/channel/UC40BgXanDqOYoVCYFDSTfHA
- Joined: Tue Mar 24, 2015 3:50 pm
- Vanderburg
- Former staff
- Posts: 1253
- Joined: Sat Nov 13, 2010 7:27 am
- Location: Dallas, TX
Re: Change timezone of database
You don't really need to store it in a different timezone, you just need to display it in a different one, so you should simply shift all the date/time converting responsibility over to your scripting language.
Re: Change timezone of database
Have you tried something like this at the beginning of your session?
Code: Select all
SET SESSION time_zone = '+01:00'
- rlm850
- This is my homepage
- Posts: 141
- Joined: Thu Dec 10, 2009 12:17 am
- Location: Staten Island, NY
- Contact:
Re: Change timezone of database
This is totally off topic and I hope you guys don't mind.. but I absolutely love your avatar. You forgot the point though!Vanderburg wrote:You don't really need to store it in a different timezone, you just need to display it in a different one, so you should simply shift all the date/time converting responsibility over to your scripting language.