Last modified: 2012-08-14 11:24:08 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T9715, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 7715 - Use date_default_timezone_* instead of TZ environment variable if available
Use date_default_timezone_* instead of TZ environment variable if available
Status: RESOLVED DUPLICATE of bug 2658
Product: MediaWiki
Classification: Unclassified
General/Unknown (Other open bugs)
1.9.x
All All
: Normal normal with 2 votes (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks: 2658 6941
  Show dependency treegraph
 
Reported: 2006-10-26 09:50 UTC by nekocue
Modified: 2012-08-14 11:24 UTC (History)
4 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments
patch to GlobalFunctions.php and Parser.php (1.82 KB, patch)
2006-10-26 09:56 UTC, nekocue
Details

Description nekocue 2006-10-26 09:50:47 UTC
Since PHP 5.1.0, it is recommended to use date_default_timezone_set/date_default_timezone_get 
functions instead of setting `TZ' environment variable to change the time zone. And the 
former may enable users to change the time zone under safe-mode systems which prevent 
changing environment variables.
Comment 1 nekocue 2006-10-26 09:56:52 UTC
Created attachment 2577 [details]
patch to GlobalFunctions.php and Parser.php

This patch replaces putenv('TZ=foo') and getenv() with date_default_timezone_*
functions, and provides compatible functions setting/getting TZ environment
variable for PHP < 5.1.0.
Comment 2 Robert Leverington 2008-05-28 07:42:58 UTC
Fixed in r35469.
Comment 3 AlefZet 2008-05-28 15:38:31 UTC
Strict standards error in Parser.php with function date()

Displayed error message:

Strict Standards: date() [function.date]: It is not safe to rely on the system's timezone settings. Please use the date.timezone setting, the TZ environment variable 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 'Asia/Karachi' for '5.0/no DST' instead in C:\xampplite\htdocs\w\includes\Parser.php on line 2388

Lines changes from 2388 to 2396
Environment: Windows XP SP2, XAMPPlite v. 1.6.2 

My guess: this is introduced in r35469
Comment 4 Robert Leverington 2008-05-28 17:55:05 UTC
Reverted in r35504.  Regardless an E_STRICT level error does not constitute a major seveirty and High priority bug.
Comment 5 Chad H. 2009-07-24 19:23:00 UTC

*** This bug has been marked as a duplicate of bug 2658 ***

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links