Feature #37438

Remove setting default timezone on its own

Added by Adrian Föder over 9 years ago. Updated over 9 years ago.

Status:
Resolved
Priority:
Should have
Assignee:
Category:
Core
Start date:
2012-05-23
Due date:
% Done:

100%

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

Description

Core/Bootstrap contains the following lines:

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

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"" error more beautifulNew2012-12-19

Actions
#1

Updated by Karsten Dambekalns over 9 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 over 9 years ago

  • Tracker changed from Feature to Task
#3

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

  • Status changed from New to Needs Feedback
  • Assignee set to Robert Lemke

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

#5

Updated by Robert Lemke over 9 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 over 9 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 over 9 years ago

  • Status changed from Needs Feedback to Accepted
  • Assignee 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 over 9 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 over 9 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 over 9 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 over 9 years ago

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

Also available in: Atom PDF