Help with PHP gmstrftime and setlocale

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Dariusz

    Help with PHP gmstrftime and setlocale

    I am writing a guestbook script using MySQL, the part of the script below
    is a loop which executes to read from the database all the input data to
    print it out to screen.

    1)
    In the $gbDate line, the $T argument displays as $T instead of the actual
    time in Windows. Is this a fault in Windows, or have I done something
    wrong? Webpage will eventually be in Unix server online.

    2)
    If I uncomment the setlocale line, the output date string still stays in
    English rather than whatever language I want it to output - how can I get
    that to work? Does it work on localhost?

    I am using PHP4.3.2, Apache2, MySQL 4 - all on Windows98SE machine running
    as localhost.

    Thanks

    Dariusz



    // setlocale (LC_TIME, 'nl,NL');

    while ($row = mysql_fetch_arr ay($result))
    {
    $gbID = $row['gbID'];
    $gbDate = gmstrftime('%A %d %B %Y at $T',strtotime($ row['gbDate']));
    $gbURL = $row['gbURL'];
    $gbName = $row['gbName'];
    $gbComment = $row['gbComment'];

    $display_entry .= "$gbID:<BR><B>P osted: </B>$gbDate &nbsp;<B>IP:
    </B>Logged<BR><B> Name: </B>$gbName<BR><B >Personal website:
    </B>$gbURL<BR><B> Comment: </B>$gbComment<BR ><BR>";
    }
Working...