Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
integration
prechecker
Commits
28908d2d
Commit
28908d2d
authored
May 02, 2016
by
David Monllaó
Browse files
MDL-54008 tz: Avoid using Caracas tz
Changed in May 2016.
parent
0e381017
Changes
1
Hide whitespace changes
Inline
Side-by-side
lib/tests/scheduled_task_test.php
View file @
28908d2d
...
...
@@ -132,8 +132,9 @@ class core_scheduled_task_testcase extends advanced_testcase {
// We are testing a difference between $CFG->timezone and the php.ini timezone.
// GMT+8.
date_default_timezone_set
(
'Australia/Perth'
);
// GMT-04:30.
$CFG
->
timezone
=
'America/Caracas'
;
// GMT+04:30.
$CFG
->
timezone
=
'Asia/Kabul'
;
$testclass
=
new
\
core\task\scheduled_test_task
();
...
...
@@ -149,9 +150,9 @@ class core_scheduled_task_testcase extends advanced_testcase {
$userdate
=
userdate
(
$nexttime
);
// Should be displayed in user timezone.
// I used http://www.timeanddate.com/worldclock/fixedtime.html?msg=Moodle+Test&iso=201
40314
T01&p1=
58
// to verify this time.
$this
->
assertContains
(
'
11
:15 AM'
,
core_text
::
strtoupper
(
$userdate
));
// I used http://www.timeanddate.com/worldclock/fixedtime.html?msg=Moodle+Test&iso=201
60502
T01&p1=
113
//
setting my location to Kathmandu
to verify this time.
$this
->
assertContains
(
'
2
:15 AM'
,
core_text
::
strtoupper
(
$userdate
));
$CFG
->
timezone
=
$currenttimezonecfg
;
date_default_timezone_set
(
$currenttimezonephp
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment