Default Time Zones With Xampp 1.7.4

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

Default Time Zones With Xampp 1.7.4

Postby Apophis55 » 22. July 2011 01:01

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.
Apophis55
 
Posts: 3
Joined: 22. July 2011 00:55

Re: Default Time Zones With Xampp 1.7.4

Postby Sharley » 23. July 2011 03:24

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
User avatar
Sharley
AF Moderator
 
Posts: 3316
Joined: 03. October 2008 05:10
Location: Yeppoon, Australia Time Zone: GMT/UTC+10
Operating System: Win 7 Pro 32bit/XP Pro SP3

Re: Default Time Zones With Xampp 1.7.4

Postby Apophis55 » 23. July 2011 05:16

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.
Apophis55
 
Posts: 3
Joined: 22. July 2011 00:55

Re: Default Time Zones With Xampp 1.7.4

Postby FxBe » 26. August 2011 09:37

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
FxBe
 
Posts: 2
Joined: 26. August 2011 09:20

Re: Default Time Zones With Xampp 1.7.4

Postby Altrea » 26. August 2011 10:08

Try the php-function setlocale().
But be careful. It depends on the OS-Version you use, which is the right setting to set.
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 11935
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 11 Pro x64

Re: Default Time Zones With Xampp 1.7.4

Postby FxBe » 26. August 2011 11:58

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
FxBe
 
Posts: 2
Joined: 26. August 2011 09:20


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 91 guests