Keep Server Online
If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.
or
A donation makes a contribution towards the costs, the time and effort that's going in this site and building.
Thank You! Steffen
Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
| |
|
Topic: Apache 2.2.22 & PHP 5.3.8 - Date/Time format problems |
|
Author |
|
HelderS
Joined: 11 Sep 2012 Posts: 2 Location: Portugal
|
Posted: Tue 11 Sep '12 15:20 Post subject: Apache 2.2.22 & PHP 5.3.8 - Date/Time format problems |
|
|
Hello, everyone,
I'm experiencing some problems after I installed Apache 2.2.23 and PHP 5.3.8 on a Windows Server 2008 R2.
I've both Apache and PHP working. But when I started to use my web application that uses Dates, which were working ok on a different computer, but accessing same database computer( portuguese date/time definitions).
The problem is: I've defined in "Region and Language" settings of Windows to Portuguese format( day-month-yyyyear Hour:Minute:Seconds ), and when I retrieve a Date/Time variable from a SQL Database it returns in a format that appears to be American ( month/day/yyyyear Hour:Minutes:Seconds AM/PM )
Is it possible to define the portuguese format anywhere in Apache?
I've already changed the setting for timezone in php.ini, but It seems to remain the same.
Hope someone could help me.
Thanks in advance.
Best regards,
Hélder Silva |
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7371 Location: Germany, Next to Hamburg
|
Posted: Tue 11 Sep '12 15:30 Post subject: |
|
|
You can sue pure PHP to do so.
Code: |
$datetime = strtotime($row->createdate);
$mysqldate = date("d-m-Y H:i:s", $datetime);
|
|
|
Back to top |
|
HelderS
Joined: 11 Sep 2012 Posts: 2 Location: Portugal
|
Posted: Tue 11 Sep '12 15:41 Post subject: |
|
|
Yes, but like I said, it was actually working before this new setup, and I'm avoiding change the PHP code.
Thanks anyway, but not the solution I was looking for.
Hélder |
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7371 Location: Germany, Next to Hamburg
|
|
Back to top |
|
|
|
|
|
|