Jump to content

timezone web server?


Wiranata

Recommended Posts

Your going to need to clarify your issue. Mysql is a *database* server.

Your going to need to clarify your issue. Mysql is a *database* server.

 

how can i do this??

in localhost i succesfully about this,but when i upload form with timezone...timezone is wrong

Link to comment
Share on other sites

When MySQL has been started, by default it takes the time zone of the local machine(server).

 

If you are using shared hosting server, you don't have permissions to change a global time zone on the server and the database.

 

By default each client that connects has its own time zone setting, given by the session time_zone variable in MySQL.

 

You can change your own time_zone using the sql SET statement.

 

For example:

 


SET time_zone = 'America/Toronto'

or

SET time_zone = '+07:00'

or

ALTER DATABASE <database_name> SET time_zone = 'America/Toronto'

 

Take a look at here to obtain much more details about this.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.