Different MSSQL output date format from the same PHP script

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

    Different MSSQL output date format from the same PHP script

    Hi list!

    A quick question (and I hope a quick answer!).

    I have a Windows Server 2003 R2 SP2 box where MS SQL 2000 SP4 is
    running.
    I have a debian "sarge" box running apache 2.0.54-5sarge2 and
    libapache2-mod-php4 4.3.10-22.
    I have another debian "lenny" box running apache 2.2.8-1 and
    libapache2-mod-php 5 5.2.5-2.

    On the two servers I have the same php script that queries a database
    on the SQL server. One of the queried colums holds a datetime, and I
    have that the output format is different between the two servers:
    lenny server: Jun 7 2007 12:00:00:000AM
    sarge server: Thu Jun 7 00:00:00 2007 <- this is what I want

    I did not use any interpolation function (like strtotime()) but the
    outcome is different.
    How can I have the same output on the lenny server? Is this a server
    configuration issue or what else? I would like not to use any php
    function because I want to migrate my scripts from the old server to
    the new one with the minimum effort.

    TIA
    --Alessandro
  • Alessandro

    #2
    Re: Different MSSQL output date format from the same PHP script

    On 18 Feb, 17:36, Alessandro <fag...@gmail.c omwrote:
    Hi list!
    >
    [...]
    >
    Any hint please!
    I made some test on the two boxes. The output of the date command is
    the same:
    Tue Feb 19 08:41:57 CET 2008
    so it should be a matter of php/apache configuration. Where should I
    look?
    I tried to compare the main configuration scripts but with no
    success...

    Comment

    Working...