Bug #54181

Use date_default_timezone_get() instead of ini_get('date.timezone')

Added by David Lundgren over 1 year ago. Updated 2 months ago.

Status:New Start date:2013-12-04
Priority:Could have Due date:
Assigned To:- % Done:

0%

Category:Core
Target version:-
PHP Version: Complexity:easy
Has patch:Yes Affected Flow version:Git master

Description

Using date_default_timezone_get() instead of ini_get('date.timezone') in TYPO3\Flow\Core\Bootstrap would allow developers to set the timezone in code instead of modifying the php.ini.

typo3_flow_core_bootstrap.patch Magnifier (645 Bytes) David Lundgren, 2013-12-04 03:13

laravel.png (14.5 kB) David Mair Spiess, 2015-06-01 18:54


Related issues

related to TYPO3.Flow - Feature #44123: Make the "Flow requires the PHP setting "date.timezone"" ... New 2012-12-19

History

#1 Updated by Adrian Föder over 1 year ago

I'm against this suggestion because at the last stage it guesses "something" which is not reliably at all; and the intention of this line of code is exactly to avoid any kind of ambiguities...

#2 Updated by Mathias Brodala about 1 year ago

I am totally in favor of this suggestion because this is the no. 1 issue people struggle with setting up TYPO3 Flow/Neos. There is absolutely no reason (at least none known to me) to artificially put a hard break here. Please enlighten me if there is a reason.

Otherwise I'd strongly suggest integrating this change. Also two of the four stages in date_timezone_get (including the last guessing stage) are dropped with PHP 5.4. Maybe one tweak: check against "UTC" as this is returned as last resort and unlikely to be a user setting.

#3 Updated by Patrick Lobacher about 1 year ago

I strongly agree - the installation is the most difficult part in the moment for every newbie and we should simplify the process where ever we can

#4 Updated by David Mair Spiess 2 months ago

+1 for this. A lot of people struggle with this. Other frameworks like Laravel do it also.

Also available in: Atom PDF