Feature #37438

Remove setting default timezone on its own

Added by Adrian Föder about 3 years ago. Updated about 3 years ago.

Status:Resolved Start date:2012-05-23
Priority:Should have Due date:
Assigned To:Adrian Föder % Done:

100%

Category:Core
Target version:TYPO3 Flow Base Distribution - 2.0 beta 1
PHP Version: Complexity:easy
Has patch:No

Description

Core/Bootstrap contains the following lines:

1if (ini_get('date.timezone') === '') {
2    date_default_timezone_set('Europe/Copenhagen');
3}

I assume this is mainly to avoid that default_timezone E_WARNING (->Exception), which is fine so far.

As this timezone is a design decision however, I strongly recommend setting this to UTC. This is the only time zone that makes sense in any way in this context.


Related issues

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

Associated revisions

Revision 3f3b1e00
Added by Adrian Föder about 3 years ago

[!!!][TASK] Remove FLOW3's magic timezone setting behavior

FLOW3 used to magically set a default timezone if there's none set
(in order to avoid the PHP notice being thrown, resulting in an
exception).

Because every default time zone will be the wrong one for most people;
and to raise awareness of having to care about the system's time zone,
this behavior is dropped.

This change is marked breaking because in cases where no timezone
is set in PHP configuration, FLOW3 will no longer work.

Change-Id: Ife9a5b78c4cdc275df0c19235c74790334218cb3
Resolves: #37438
Releases: 1.2

History

#1 Updated by Karsten Dambekalns about 3 years ago

It is a reference to the inventor of TYPO3, who happens to live in Copenhagen. :)

And any timezone we set here will make little sense to most people. Except the ones for whom this timezone happens to be the correct one.

#2 Updated by Karsten Dambekalns about 3 years ago

  • Tracker changed from Feature to Task

#3 Updated by Adrian Föder about 3 years ago

  • Tracker changed from Task to Feature

And any timezone we set here will make little sense to most people.

Exactly, and that's exactly the reason why the only thing that makes sense for "most" people, and is responsibly, is to set this to UTC.

You might have noticed I'm a bit paranoid regarding timezone issues ;-)

#4 Updated by Karsten Dambekalns about 3 years ago

  • Status changed from New to Needs Feedback
  • Assigned To set to Robert Lemke

Robert, it was your idea - so IMHO it's your decision :)

#5 Updated by Robert Lemke about 3 years ago

Well, today I tend to omit that check altogether and let FLOW3 throw the exception. Anything which speaks against this?

#6 Updated by Adrian Föder about 3 years ago

+1 from me to remove that check! That UTC suggestion was only a tradeoff; I indeed tend to force the users to make that TZ decision on their own.
Again, the fact that the framework heavily uses \DateTime which is stored timezone-less in the data base makes a correct time zone even more important; at least to create the user-awareness.

#7 Updated by Robert Lemke about 3 years ago

  • Status changed from Needs Feedback to Accepted
  • Assigned To changed from Robert Lemke to Adrian Föder
  • Priority changed from Must have to Should have

Great. Do you mind committing a respective patch? Otherwise just assign this back to me ...

#8 Updated by Adrian Föder about 3 years ago

  • Subject changed from Set default timezone to UTC instead unreasonable Europe/Copenhagen to Remove setting default timezone on its own

#9 Updated by Gerrit Code Review about 3 years ago

  • Status changed from Accepted to Under Review

Patch set 1 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/12749

#10 Updated by Gerrit Code Review about 3 years ago

Patch set 2 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/12749

#11 Updated by Adrian Föder about 3 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100

Also available in: Atom PDF