Duplicated declarations of date_default_timezone_set

Bug #682414 reported by XavierAntoviaque
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Humanity Project
Fix Released
Low
Vlad Dragu

Bug Description

The date_default_timezone_set declaration appears in multiple places in the code:

antoviaque@antoviaque-laptop:/var/www/hackit.local$ grep -R DEFAULT_TIMEZONE . -R
./classes/class_action_logger.php: date_default_timezone_set(DEFAULT_TIMEZONE);
./includes/includes.php:date_default_timezone_set(DEFAULT_TIMEZONE);
./proxy/index.php:date_default_timezone_set(DEFAULT_TIMEZONE);
./tests/php/hackit_all_tests.php:date_default_timezone_set(DEFAULT_TIMEZONE);
./config/config.php.dist:define('DEFAULT_TIMEZONE', 'UTC');
./config/config.php:define('DEFAULT_TIMEZONE', 'UTC');

In some places (like ./classes/class_action_logger.php) it wasn't clear if there was something that made the duplication necessary, so I didn't cleanup myself. Can you have a look and see if you can factorize this somewhere?

Changed in hackit:
status: New → Confirmed
importance: Undecided → Low
assignee: nobody → Vlad Dragu (vlad-dragu)
milestone: none → alpha3.0
Revision history for this message
Vlad Dragu (vlad-dragu) wrote :

I moved the declaration in the config file and modified the config.php.dist accordingly
The one in class_action_logger i could not remove because it seems that OWA is messing with that value and i need to reset it right after i invoke OWA

Changed in hackit:
status: Confirmed → Fix Committed
Changed in hackit:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.