I'm trying to keep all my dates and times to a standard GMT (UTC) time when I store it into the database. When I pull the data however, I want to be able to do the timezone adjustment within the query. I've tried something like this with no luck:

select convert_tz([B]date[/B], '+00:00', '-05:00') from [B]table[/B];

where date is a column in table (and I'm trying to convert to EST (GMT -5))
Is there something I'm missing or don't know about? Please help.

What version of MySQL is this running on?

Have you searched the MySQL newsgroup?

It seems to me if you had a field for timezone offset, when you pull the data your scripting language (or MySQL statement) can use that to calculate the correct time.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.