dcsimg
A Flash Developer Resource Site

Results 1 to 6 of 6

Thread: Message Board Time Issue

  1. #1
    Senior Member
    Join Date
    Aug 2004
    Posts
    130

    Message Board Time Issue

    I have a message board using PHP. When a message is time-stamped it is 3 hours behind the actual time. The code is supposed to be taking the time from the computer it's running on. Is anyone aware of what might be causing this problem. Thanks.

    PHP Code:

    $posted = strftime("%D %I:%M %p");

  2. #2
    Bosanceros
    Join Date
    Feb 2005
    Location
    Revere, MA
    Posts
    21
    The code is not getting time from the computer its getting the server time,

    also wrong forum...


    try this code

    $posted = date("H:i:s",time());

  3. #3
    Senior Member
    Join Date
    Aug 2004
    Posts
    130
    Thanks for the response - unfortunately your code didn't work. It just switched the time to 24 hour standard.

    I agree with you that the code is getting it's time from the server as I am located on the eastern seaboard of the US and the sever is located on the western seaboard. And the western seaboard is 3 hours behind. Is there any way to resolve this?

    Thanks. Also, although the question is PHP based, the message board is written in Flash MX. I love this forum and would never abuse the priviledge.

  4. #4
    Bosanceros
    Join Date
    Feb 2005
    Location
    Revere, MA
    Posts
    21
    try something like:

    $posted = date("H:i:s",time());
    $postedDate = ($posted-3);


    but i wonder what would happen if someone from western seaboard is to post something, it would minus his time too, making it incorrect...

    bump...

    goodluck....
    Last edited by alenxVR6; 11-29-2005 at 03:47 AM.

  5. #5
    Senior Member
    Join Date
    Aug 2004
    Posts
    130
    How can I subtract 3 hours from this code:


    $posted = strftime("%D %I:%M %p");


    Thank you.

  6. #6
    Flash Gordon McUsher's Avatar
    Join Date
    Mar 2001
    Location
    Krautland
    Posts
    1,560
    No clue, but this would work out only for one Timezone, why don't you make
    the client send you a date, and use the GMT offset he sends you?
    My letters on the F1 key have faded, how are yours today?

Posting Permissions

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




Click Here to Expand Forum to Full Width

HTML5 Development Center