Support » Fixing WordPress » GMT point?

  • I don’t know what the point in the new GMT fuctions is. I’m sure it will come clear later on.
    Anywaste, all my dates are screwed and I keep getting this error:
    SQL/DB Error:
    [You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near ')=2004 AND MONTH(DATE_ADD(post_date, INTERVAL '-5:0' HOUR_MINUT]
    SELECT DISTINCT * FROM wp_posts WHERE 1=1 AND YEAR()=2004 AND MONTH(DATE_ADD(post_date, INTERVAL '-5:0' HOUR_MINUTE))=02 AND DAYOFMONTH(DATE_ADD(post_date, INTERVAL '-5:0' HOUR_MINUTE))=24 AND DATE_ADD(post_date, INTERVAL '-5:0' HOUR_MINUTE) <= '2004-02-26 00:53:00' AND (post_status = "publish") GROUP BY wp_posts.ID ORDER BY post_date DESC

Viewing 12 replies - 1 through 12 (of 12 total)
  • Did you run upgrade.php? There is a fix last night that took care of some problems, if you don’t have the latest code.

    First, what should my GMT be set to. I’m in Hawaii my GMT is -10 but the server is on the east coast US, GMT -5. I’m confused.
    Running the upgrade set the last weeks post ahead 1 day, err.
    Why are they changing the date functions?

    Moderator Matt Mullenweg



    I would not recommend running the CVS right now, as it’s not very stable at the moment.

    I reinstalled a back up and installed the latest nightly. Following this post. Everything appears fine now.

    But I still don’t understand how to find the right GMT.
    I currently have mine set at +3. Which is returning my correct time. The server is 3 hours ahead of me. Is this the correct formula?

    Chris – uh no… the +3 should be the timezone difference from GMT. for instance, I am -6 GMT, wich is the Central TZ for the US….. there seems to be some discrepancy in if it should be based on the SERVER’s time from GMT, or yours…. I know I asked, but my memory isn’t what it used to be and I have… uh… what’s it called when you can’t remember something?…. oh, yeah! forgotten. I forgot what the answer was.
    ALLUUUUUUUUSION! Can you give us a ruling?

    sigh, this is very confusing. I’m doubting they should have changed the times at all.

    I’m using the new CVS and the offset is now from GMT, not from your server. The major bugs that I had been experiencing were fixed last night or this morning…I’m still testing some things to see if they fixed it all.

    So, my GMT would be set to -10? When I use -10 it posts my new posts to 1am feb 26th.
    Sigh, I’m just going to run the older (before gmt) until all the bugs are out.

    I find the GMT method very useful & logical. Before using it, you had to know your time zone difference RELATIVE to the Server’s TZ – which could be anywhere in the world.
    Now with WP1.1, all times are referred to GMT (aka: London, UK time). You see the GMT and compare it to your Local time. If let’s say, you are in NY, US (west of London), you will note that your LMT is 5 hours LESS than GMT, so you set it to differ by -5 (minus 5). If you are in Moscow, Russia (east of London), you are AHEAD of GMT by 3 hours, so you set the difference to 3 hours. No more concern about the location of the Server! Great!!

    I don’t understand why we have to insist on understanding GWT (which, by the way, has been replaced by UTC.
    Simply ask to “adjust the time” by displaying the current server’s time among 23 other options (timezone offsets). For example, let’s say your server is set at 14:30 but your real time is 18:30.
    The field would display “14:30” in a drop-down list and propose to choose 00:30, 01:30, 02:30…
    If you choose 18:30 then the calculation is done by the admin script (18:30 – 14:30 = 4 hours offset). So… the offset stored in the DB would be +4 . No need to change DB structures or other logic, simply the interface. Any takers for this 5 minutes mod ? 😉 Don’t forget about daytime savings 😉

    point with the GMT and other details is that you can use the time() function in PHP to create the date itself, and modify the displayed time after that, by parsing the time with the GMT chosen by the admin… problem is the users that are not navigating from the same region, and where the GMT is different (Canada have 3+ GMT sets…)
    there is always problems using different techniques to have time and dates…

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘GMT point?’ is closed to new replies.