+ Reply to Thread
Results 1 to 3 of 3

Thread: MySQL CONVERT_TZ() not supported?

  1. #1
    Join Date
    Aug 2008
    Posts
    1

    Default MySQL CONVERT_TZ() not supported?

    HI, I was trying to do a simple datetime timezzone conversion using mysql 5+ function CONVERT_TZ()

    mysl ref docs says it relies on timezone tables installed at a database

    does anyone have any simple solutions so that I can use this function. Please understand I am not asking to change the timezone settings of mysql or the server, only interested in getting the CONVERT_TZ function to work. It's a simple string concersion that uses a table.

    thanks

    PS: the tables in question are here http://dev.mysql.com/downloads/timezones.html

  2. #2
    Join Date
    Sep 2008
    Posts
    1

    Default

    I am in the same boat. I use a TIMESTAMP field in mySql to keep up with modification dates, but would like to present them on web pages as US/Central, not US/Mountain. The help desk was clueless on this one. If I can't manage a global conversion at the database level, about all I can do is modify the dates as they are extracted from the tables with ADDDATE(<date from table>,INTERVAL 1 day); Seems like picking your teeth with a tire iron, but it's all I have. If someone comes up with a better idea, I'm all ears.

  3. #3
    Join Date
    Feb 2006
    Posts
    234

    Default

    Ok, that's definitely reasonable.

    The timezone data has now been imported into the mysql.time_zone* tables on all customer boxes.

    -Steve
    Steve Alligood
    Principal Systems Administrator
    Bluehost.com

+ Reply to Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts