Brian Snopek writes:
> I'm fairly certain now() runs off system time...so you can adjust your system > time on the server to reflect your time zone... The computer should know what timezone it's in. You can unset TZ before running safe_mysqld to get MySQL to run on UTC, but that is a kludge, really. The root of all problems is that MySQL uses local time instead of UTC, and that causes all sorts of annoying problems, especially when daylight savings time is toggled, or when doing replication, or when dealing with people from other timezones, or... you get my point. Until the MySQL team gains respect for timezone issues, we'll be stuck with a MySQL that can't distinguish UTC from local time, and we'll be forced to do all timezone calculations on the application side. The approach I'll be taking is to run MySQL with TZ set to local time, and allow local time t obe used where it's not critical, but compensate for TZ differences in the handling of sessions, job control, and everywhere else where time differences are involved. > if thats not possibly, or not wanted, in place of now, you can use.. > > DATE_SUB(NOW(), INTERVAL 2 HOUR) Except that you'd have to extract the correct offset from your current local timezone. And of course you must know what TZ the server has. The number of hours might not be an integer, btw, but I'm pretty sure the number of seconds will. //C - earlier than usual -- Carl Troein - Círdan / Istari-PixelMagic - UIN 16353280 [EMAIL PROTECTED] | http://pixelmagic.dyndns.org/~cirdan/ Amiga user since '89, and damned proud of it too. --------------------------------------------------------------------- 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