Project

General

Profile

Bug #691

warning date() on installation

Added by Tim Brouckaert almost 13 years ago. Updated almost 12 years ago.

Status:
Bug resolved
Priority:
Normal
Assignee:
Tim Brouckaert
Target version:
Start date:
10/03/2010
Due date:
% Done:

100%

Estimated time:
Complexity:
Normal

Description

  • Warning: date(): It is not safe to rely on the system’s timezone settings. You are required to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected ‚Europe/Berlin’ for ‚CET/1.0/no DST’ instead in /Users/tim/Sites/chamilo2.0/install/lib/install_manager/install_manager.class.php on line 156

possible solution: load default config to use in installation


Files

index.php (2.26 KB) index.php Tim Brouckaert, 15/03/2010 20:28

History

#1

Updated by Tim Brouckaert almost 13 years ago

  • File index.php index.php added
  • Assignee set to Tim Brouckaert
  • % Done changed from 0 to 90

added

if ((ini_get('date.timezone') == '')){
ini_set('date.timezone', 'Europe/Brussels');
}

in install/index.php

please verify / correct

#2

Updated by Stefaan Vanbillemont almost 13 years ago

Tim,

When did you get this warning? During the installation? Keep in mind that we are developing a worldwide product, so setting Europe/Brussels is a possible fix but only for a very limited amount of people if you consider the entire world using Chamilo.
And if it is only a warning, don't know if we should pay so much attention to it. After the installation the administrator has the option to select the correct timezome.

Stefaan

#3

Updated by Tim Brouckaert almost 13 years ago

This was indeed during the installation on a PHP5.3 system.
If you don't care about the warning (and it's only to show the year below), you can also change line 156 in install_manager.class.php
from:
$links[] = '© ' . date('Y');
to:
$links[] = '© ' . @date('Y');

this will suppress the warning.

Tim

#4

Updated by Stefaan Vanbillemont almost 13 years ago

  • Status changed from New to Needs testing
  • % Done changed from 90 to 100

I implemented your last suggestion.

#5

Updated by Stefaan Vanbillemont almost 13 years ago

  • Status changed from Needs testing to Bug resolved
#6

Updated by Stefaan Vanbillemont almost 12 years ago

  • Project changed from Chamilo LCMS Connect to Installation
  • Category deleted (16)
#7

Updated by Stefaan Vanbillemont almost 12 years ago

  • Target version changed from 2 to 1.0.0

Also available in: Atom PDF