List:General Discussion« Previous MessageNext Message »
From:Tim Lucia Date:March 22 2007 2:38am
Subject:RE: What does NOW() return: linux time or something else?
View as plain text  

> -----Original Message-----
> From: murthy gandikota [mailto:murthy_gandikota@stripped]
> Sent: Wednesday, March 21, 2007 6:05 PM
> To: mysql@stripped
> Subject: What does NOW() return: linux time or something else?
> 
> Hi
>   I tried to look up the time functions specifically for the disparity
> between NOW() and the linux time obtained with 'date'. Why are they
> different? How can I set the database time?

What is the disparity between them?  On my Linux (RHEL V.4) box, the two are
in sync:

[root@mysql1 ~]# uname -a
Linux mysql1 2.6.9-22.ELsmp #1 SMP Mon Sep 19 18:00:54 EDT 2005 x86_64
x86_64 x86_64 GNU/Linux
[root@mysql1 ~]# date
Wed Mar 21 22:33:31 EDT 2007
[root@mysql1 ~]# mysql
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 115302 to server version: 5.0.24-standard-log

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

(root@localhost) [(none)]> select now();
+---------------------+
| now()               |
+---------------------+
| 2007-03-21 22:33:36 |
+---------------------+
1 row in set (0.00 sec)


> 
>   Thanks
>   Murthy
> 
> 
> ---------------------------------
> Looking for earth-friendly autos?
>  Browse Top Cars by "Green Rating" at Yahoo! Autos' Green Center.


Thread
What does NOW() return: linux time or something else?murthy gandikota21 Mar
  • RE: What does NOW() return: linux time or something else?Tim Lucia22 Mar
  • RE: What does NOW() return: linux time or something else?Jerry Schwartz22 Mar