timezone questions

2010-03-29 Thread Elim PDT
data from one server in timezone A ported to another server in timezone B, 
what will happen for the records with datetime columns?


What is the recommended way of handling this kind of issues? Thanks 



--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org



RE: timezone questions

2010-03-29 Thread Daevid Vincent
 -Original Message-
 From: Elim PDT [mailto:e...@pdtnetworks.net] 
 Sent: Monday, March 29, 2010 5:57 PM
 To: mysql@lists.mysql.com
 Subject: timezone questions
 
 data from one server in timezone A ported to another server 
 in timezone B, what will happen for the records with datetime columns?

If you have a timezone stored on your server, then all dates/times are
stored relative to that. If you now change it, say you were in CA and moved
to NY, your times retrieved are now actually 3 hours off technically
depending. Even if you set your new timezone to NY. mySQL doesn't store the
timezone you started with. It just stores that you created the record at
noon let's say. That noon is the noon where the server timezone is. This
may or may not be an issue for you depending on your application. If you're
moving an entire company and this is a local database with respect to the
company (say, a time-off tracker, or payroll or something) you may not
care. All you care is that at 3pm some user asked for time off. And since
you all now live in NY, it's your 3pm local time. 

Now, having said that, this in most cases is a huge deal since the web is
global and rarely do web pages live in such a local setting. More often,
there are people from different time zones accessing them.

 What is the recommended way of handling this kind of issues? Thanks 

Real sites set their timezone to UTC and store everything in the database
as UTC as well.

Then you adjust the time on the client based upon their local timezone.

Both PHP and mySQL (and other languages) have functions to convert based
upon the TZ variable.

ÐÆ5ÏÐ 


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org



timezone questions

2005-02-15 Thread Elim Qiu
Dear list,
I never tried any timezone features(options) of mysql and like 
to learn from you.

(1) In what situation one need to set mysql timezone? 
 (I know there are application level timezone solutions)
(2) What the effect if a custome timezone is settled with mysql?

I use mysql for web applications and need to deal with timezone
at web page generation level. Also I hope my datetime related data 
in the database be server timezone independent so that the data
can be replicated among database servers located  in possibly 
different zones.

Thanks


-- 
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.300 / Virus Database: 265.8.8 - Release Date: 2/14/2005



-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]