Page 1 of 1

Default Time Zones With Xampp 1.7.4

PostPosted: 22. July 2011 01:01
by Apophis55
Hello. Apologies if this has already been answered but a search of the forum revealed answers to previous versions of Xampp and not 1.7.4.

In previous versions of Xampp, in order to change the default time zone one had to make changes to 2 files:

    C:\xampp\php\php.ini
    C:\xampp\mysql\bin\my.ini

Has this changed with Xampp 1.7.4? Navigating to C:\xampp\mysql\bin\my.ini I no longer see an option to set/change the default time zone.

Thanks in advance.

Re: Default Time Zones With Xampp 1.7.4

PostPosted: 23. July 2011 03:24
by Sharley
Apophis55 wrote:In previous versions of Xampp, in order to change the default time zone one had to make changes to 2 files:
C:\xampp\php\php.ini
C:\xampp\mysql\bin\my.ini
In previous versions to 1.7.4 (for example 1.7.3) the setup_xampp.bat file took care of this chore.

In 1.7.4 several 1.7.3 features have been omitted, so you would need to add the my.ini file entry manually.

In the my.ini file you would need to add the line in red in the location defined below, like so
myisam_sort_buffer_size = 8M

default-time-zone = "Australia/Brisbane"

log_error = "C:/xampp/mysql/data/mysql.err"
pid_file = "mysql.pid"


In the php.ini file look for and edit this section
Code: Select all
[Date]
; Defines the default timezone used by the date functions
; http://php.net/date.timezone
date.timezone = "Australia/Brisbane"
Remember to save the files and restart Apache and MySQL.

The above time zone is for my location and the default, if unchanged, is Europe/Berlin.

The time zones for your particular location may be found here:
http://php.net/manual/en/timezones.php

Re: Default Time Zones With Xampp 1.7.4

PostPosted: 23. July 2011 05:16
by Apophis55
Sharley wrote:In 1.7.4 several 1.7.3 features have been omitted, so you would need to add the my.ini file entry manually.


I suspected as much but wanted confirmation prior to proceeding just in case it was defined elsewhere. Thanks for the assistance Sharley.

Re: Default Time Zones With Xampp 1.7.4

PostPosted: 26. August 2011 09:37
by FxBe
Thanks for the advices, my timezone is now propely set.
My main problem now is that the month are showing in english, how can i set them to french
A echo date j M Y gives me : 26 August 2011, and i want 26 aout 2011
Sorry i'm a noob on php but i'm trying my best to make it work

Re: Default Time Zones With Xampp 1.7.4

PostPosted: 26. August 2011 10:08
by Altrea
Try the php-function setlocale().
But be careful. It depends on the OS-Version you use, which is the right setting to set.

Re: Default Time Zones With Xampp 1.7.4

PostPosted: 26. August 2011 11:58
by FxBe
i found this setlocale(LC_ALL,'french'); on windows seven but where do i put it to make it work everywhere on my xampp server?
Thanks