Hello Maxim, There's a bit of confusion in this discussion: Do you (a) want to have several databases running on the db-server, and all set to different time zones, or (b) want each client to see db-stored times stated in his/her local timezone?
(a) AFAIK (and I claim no special expertise here) a single instance of MySQL will only run in a single TZ - I believe that it is possible to run the MySQL in a different TZ to that set at the OpSys/hardware level. That being the case, you likely have to investigate running multiple instances of MySQL to have Byelorussian time, GMT, and NY Time MySQL servers (for example). (b) MySQL is 'server side' coding. Other tools would be required to ascertain client-side information, such as 'user-local time'. Once the local TZ was ascertained, it would be a simple matter to compare that to the server's TZ, and modify all retrieved/entered time values accordingly. I must admit I haven't bothered. For international applications (lazily or sensibly depending...) I simply state that all times are UTC! (with the exception of my family calendar site, where all times (where stated) are 'local' (to the person's/event's location, eg the times a plane flight leaves and arrives)) You will notice that most sites settle for quoting server-local time (no matter how obscure the combination of their location and the user's) and leave the poor user to work out the math. NB contrary to parochial attitudes, most people find converting their local TZ to and from UTC to be easier than working out what the relationship is between two 'local times', eg NZST and PST (mainly because they probably have to compare both TZ values to UTC first and then do the double-math!?) If you are going for (b), what you propose makes good sense. I will be interested to hear how you get on/interested to discuss it further. Regards, =dn > But how people build web-applications then ? How can you use > web-hosting in GMT+1 if web-application will be in use in GMT+5 for > example? > Have anybody an experience of resolving this problem (without > embedding this functionality to backend app, because backend app is > allready contains ~20000 lines of code, and somewhere near to 1000 > queries). > > If someone knows how to play this around - please help! > > Friday, March 29, 2002, 3:02:57 AM, you wrote: > > GRJ> Per client? Per database? The only timezone setting in the MySQL manual is > GRJ> for the server (tz), and permits you to set it to your local timezone so it > GRJ> does not return values in GMT. > > GRJ> If you want clients to have different timezones, perhaps you should write > GRJ> that capabilty into your front-end application. > > GRJ> Gerald Jensen > > GRJ> ----- Original Message ----- > GRJ> From: "Maxim Vysotskiy" <[EMAIL PROTECTED]> > GRJ> To: <[EMAIL PROTECTED]> > GRJ> Sent: Thursday, March 28, 2002 6:46 PM > GRJ> Subject: client dependent timezone > > > GRJ> Hello mysql, > > GRJ> So nobody here (even at MySQL AB) knows how to set a timezone for a > GRJ> MySQL client ? Not for whole server but per client? (or maybe for > GRJ> database???) > GRJ> I already posted this question here few days ago - and didn't get any > GRJ> reply. > GRJ> Please! Somebody help! > > GRJ> -- > GRJ> Best regards, > GRJ> Maxim mailto:[EMAIL PROTECTED] > > > -- > Best regards, > Maxim mailto:[EMAIL PROTECTED] > > > --------------------------------------------------------------------- > Before posting, please check: > http://www.mysql.com/manual.php (the manual) > http://lists.mysql.com/ (the list archive) > > To request this thread, e-mail <[EMAIL PROTECTED]> > To unsubscribe, e-mail <[EMAIL PROTECTED]> > Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php > > --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php