RE: Obtaining GMT time in mySQL

2002-02-12 Thread Land, Christopher
MySQL: DATETIME vs. INT http://forums.devshed.com/showthread.php?s=&threadid=29754&forumid=4 C:heers! -Original Message- From: DL Neil -- Sent: Tuesday, February 05, 2002 1:28 AM Checking the MySQL manual (6.3.4 Date and Time Functions) UNIX_TIMESTAMP() UNIX_TIMESTAMP(date) ...returns

RE: Obtaining GMT time in mySQL

2002-02-05 Thread Oliver Mannion
My apologies, what I said in this previous post is incorrect. It appeared as if the time was UTC (except for daylight savings) to me, but it was mearly because of the format string As Paul DuBois quite rightly pointed out is that %h in select FROM_UNIXTIME(UNIX_TIMESTAMP(),

RE: Obtaining GMT time in mySQL

2002-02-05 Thread Land, Christopher
MySQL: DATETIME vs. INT http://forums.devshed.com/showthread.php?s=&threadid=29754&forumid=4 C:heers! -Original Message- From: DL Neil -- Sent: Tuesday, February 05, 2002 1:28 AM Checking the MySQL manual (6.3.4 Date and Time Functions) UNIX_TIMESTAMP() UNIX_TIMESTAMP(date) ...returns

Re: Obtaining GMT time in mySQL

2002-02-05 Thread DL Neil
Oliver, It's early in the morning over here, so that's my excuse for feeling confused... > >> select FROM_UNIXTIME(UNIX_TIMESTAMP(), > >> '%Y %D %M %h:%i:%s %x'); > >> UNIX_TIMESTAMP() returns the number of seconds since '1970-01-01 > 00:00:00' GMT > >> Convert this to a dat

Re: Obtaining GMT time in mySQL

2002-02-04 Thread Mike(mickalo)Blezien
Using Perl: my $GMTdate = gmtime(time); this will give you the GMT time. >>On Tue, 05 Feb 2002 15:27:18 +1100, Oliver Mannion <[EMAIL PROTECTED]> wrote: >>Right. >> >>Perl seems to work with daylight savings, how is this? >> >>At 08:03 PM 4/02/2002 -0800, James Montebello wrote: >>> >>>UTC

RE: Obtaining GMT time in mySQL

2002-02-04 Thread Oliver Mannion
Right. Perl seems to work with daylight savings, how is this? At 08:03 PM 4/02/2002 -0800, James Montebello wrote: > >UTC doesn't do daylight savings. One reason is that different places >do daylight savings at different times. We here in the Western US, for >example, are in standard time righ

RE: Obtaining GMT time in mySQL

2002-02-04 Thread James Montebello
UTC doesn't do daylight savings. One reason is that different places do daylight savings at different times. We here in the Western US, for example, are in standard time right now. In Arizona, they don't do daylight savings at all. james montebello On Tue, 5 Feb 2002, Oliver Mannion wrote:

RE: Obtaining GMT time in mySQL

2002-02-04 Thread Oliver Mannion
I am close to a solution: select FROM_UNIXTIME(UNIX_TIMESTAMP(), '%Y %D %M %h:%i:%s %x'); UNIX_TIMESTAMP() returns the number of seconds since '1970-01-01 00:00:00' GMT Convert this to a date format and you have a GMT date. Thanks to Chris Land for pointing the UNIX_TIMEST

Re: Obtaining GMT time in mySQL

2002-02-04 Thread James Montebello
You *could* use UNIX_TIMESTAMP(NOW()), which will return an integer timestamp from the server in standard Unix time, which is the number of seconds since 00h00 1 Jan 1970 UTC. However, there is no easy way to get this to display in -MM-DD HH:MM:SS format w/o the conversion to local time taki

Re: Obtaining GMT time in mySQL

2002-02-04 Thread Oliver Mannion
Hi dn, Right. Having said that tho, is there a function in mysql that will return the GMT time from the operating system, that I can subsequently use in a query. I could use the GMT time from the db client but I would prefer to use the GMT time from the operating system mySQL is running on. Than

Re: Obtaining GMT time in mySQL

2002-02-04 Thread Amandeep Jawa
"DL Neil" <[EMAIL PROTECTED]> > Date: Tue, 5 Feb 2002 00:35:28 - > To: <[EMAIL PROTECTED]>, "Oliver Mannion" <[EMAIL PROTECTED]> > Subject: Re: Obtaining GMT time in mySQL > > Hi Oliver, > >> I would like to obtain the time in GMT in

Re: Obtaining GMT time in mySQL

2002-02-04 Thread DL Neil
Hi Oliver, > I would like to obtain the time in GMT in mySQL. > > CURRENT_TIMESTAMP returns the local time > SHOW VARIABLES returns a list of variables, one being TZ which is "EST" on > my system > > But how can I get the time in GMT??? MySQL is time-neutral, that is to say, if you ask it the t

Obtaining GMT time in mySQL

2002-02-04 Thread Oliver Mannion
Hi, I would like to obtain the time in GMT in mySQL. CURRENT_TIMESTAMP returns the local time SHOW VARIABLES returns a list of variables, one being TZ which is "EST" on my system But how can I get the time in GMT??? Thanks for your time, Oliver