Bug #54181

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

Added by David Lundgren almost 8 years ago. Updated over 6 years ago.

Status:
New
Priority:
Could have
Assignee:
-
Category:
Core
Target version:
-
Start date:
2013-12-04
Due date:
% Done:

0%

Estimated time:
PHP Version:
Has patch:
Yes
Complexity:
easy

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.


Files

typo3_flow_core_bootstrap.patch (645 Bytes) typo3_flow_core_bootstrap.patch David Lundgren, 2013-12-04 03:13
laravel.png (14.5 KB) laravel.png 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"" error more beautifulNew2012-12-19

Actions
#1

Updated by Adrian Föder over 7 years 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 7 years 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 7 years 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 over 6 years ago

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

Also available in: Atom PDF