Announcement

Collapse
No announcement yet.

External PHP working great now but grabbing time wrong?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • External PHP working great now but grabbing time wrong?

    I finally got my external.php working perfectly -- but when it grabs the time on the threads -- they are all 6 hours ahead of time. Anyway I can fix this? This is the code I'm using:

    <script type="text/javascript" src="<A href="http://www.forums.com/forums/external.php?forumids=18&type=js"></script">http://www.forums.com/forums/external.php?forumids=18&type=js"></script>
    <script type="text/javascript">
    <!--
    var max = 12;
    if(threads.length < max) max = threads.length;
    for(i = 0; i < max; i++)
    {
    document.writeln("<a href=\"http://www.forums.com/forums/showthread.php?t=" + threads[i].threadid + "\">" +
    threads[i].title + "</a><br> " + threads[i].poster + " : " + threads[i].threadtime + " <br><br>");
    }
    //-->
    </script>

  • #2
    Keep in mind that external uses cached posts.

    What is your server time, your acpptions timeoffset and your usercp time.

    Three variables that could be a tricky combination to debug this.

    Comment


    • #3
      Originally posted by floris
      Keep in mind that external uses cached posts.

      What is your server time, your acpptions timeoffset and your usercp time.

      Three variables that could be a tricky combination to debug this.
      Floris,

      The Server Time is Eastern, the ACP Options Timeoffset Default is Central and my UserCP time is Central.

      It's basically 6 hours ahead of time on all the times.

      Comment


      • #4
        Originally posted by mharmon
        Floris,

        The Server Time is Eastern, the ACP Options Timeoffset Default is Central and my UserCP time is Central.

        It's basically 6 hours ahead of time on all the times.
        Sounds like you are getting the raw GMT times - which would be 6 hours different from Central time.

        Comment

        widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
        Working...
        X