Setting timezone [ver. 1.7.7]

Problems with the Windows version of XAMPP, questions, comments, and anything related.

Setting timezone [ver. 1.7.7]

Postby Kodieh » 25. April 2012 02:49

I set in php.ini the timezone:

Code: Select all
; Defines the default timezone used by the date functions
; http://php.net/date.timezone
date.timezone = America/Chicago

; http://php.net/date.default-latitude
;date.default_latitude = 41.90

; http://php.net/date.default-longitude
;date.default_longitude = 87.65


And I added in my.ini

Code: Select all
default-time-zone="America/Chicago"


It still hasn't corrected.

My real problem is that I'm using:

Code: Select all
<?php

 $date=date('l jS \of F Y h:i A'); ?>

which displays: Wednesday 25th of April 2012 03:43 AM
And when that bit was produced it was 8:43 PM for me. So, I'm trying to set that to my local time.
Kodieh
 
Posts: 1
Joined: 25. April 2012 02:44
Operating System: Windows 7 Enterprise

Re: Setting timezone [ver. 1.7.7]

Postby Theslcguy » 25. April 2012 21:27

Have your restarted apache? If not that is step 1.

Step 2. on your php script add: ini_set('date.timezone', 'America/Chicago');
Theslcguy
 
Posts: 11
Joined: 23. April 2012 21:06
Operating System: Win7


Return to XAMPP for Windows

Who is online

Users browsing this forum: JJ_Tagy and 66 guests