MySQL: DATETIME vs. INT
http://forums.devshed.com/showthread.php?s=threadid=29754forumid=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
MySQL: DATETIME vs. INT
http://forums.devshed.com/showthread.php?s=threadid=29754forumid=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
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(),
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 time, it
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 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
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.
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
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
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:
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 right
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 doesn't do daylight
11 matches
Mail list logo