•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the MySQL section within the Web Development category of DaniWeb, a massive community of 427,187 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,190 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our MySQL advertiser: Programming Forums
Views: 546 | Replies: 1
![]() |
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:
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.
select convert_tz(date, '+00:00', '-05:00') from table;
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.
.: davidianstyle :.
•
•
Join Date: Sep 2007
Location: North Bay Ontario
Posts: 176
Reputation:
Rep Power: 2
Solved Threads: 20
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.
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.
Amer Neely - Web Mechanic
"Others make web sites. We make web sites work!"
"Others make web sites. We make web sites work!"
![]() |
•
•
•
•
•
•
•
•
DaniWeb MySQL Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
Other Threads in the MySQL Forum
- Previous Thread: select query
- Next Thread: data ware housing


Linear Mode