PHP  
 PHP_HEAD
downloads | QA | documentation | faq | getting help | mailing lists | reporting bugs | php.net sites | links | my php.net 
 

Test Failure Report for ext/intl/tests/dateformat_get_set_calendar.phpt ('IntlDateFormatter: setCalendar()/getCalendar()/getCalendarObject()')

Script

1: <?php
2: ini_set
("intl.error_level"E_WARNING);
3:
ini_set("intl.default_locale""pt_PT");
4:
ini_set("date.timezone"'Atlantic/Azores');
5:
6:
$ts strtotime('2012-01-01 00:00:00 UTC');
7:
8: function 
d(IntlDateFormatter $df) {
9: global 
$ts;
10: echo 
$df->format($ts), "\n";
11:
var_dump($df->getCalendar(),
12:
$df->getCalendarObject()->getType(),
13:
$df->getCalendarObject()->getTimeZone()->getId());
14: echo 
"\n";
15: }
16:
17:
$df = new IntlDateFormatter('fr@calendar=islamic'00'Europe/Minsk');
18:
d($df);
19:
20:
21:
//changing the calendar with a cal type should not change tz
22:
$df->setCalendar(IntlDateFormatter::TRADITIONAL);
23:
d($df);
24:
25:
//but changing with an actual calendar should
26:
$cal IntlCalendar::createInstance("UTC");
27:
$df->setCalendar($cal);
28:
d($df);
29:
30:
?>
31:
==DONE==
32:

Expected

dimanche 1 janvier 2012 ap. J.-C. 03:00:00 UTC+03:00
int(1)
string(9) "gregorian"
string(12) "Europe/Minsk"

dimanche 8 Safar 1433 AH 03:00:00 UTC+03:00
int(0)
string(7) "islamic"
string(12) "Europe/Minsk"

dimanche 1 janvier 2012 ap. J.-C. 00:00:00 UTC
bool(false)
string(9) "gregorian"
string(3) "UTC"

==DONE==

Output

dimanche 1 janvier 2012 02:00:00 Heure normale de l’Europe de l’Est
int(1)
string(9) "gregorian"
string(12) "Europe/Minsk"

dimanche 8 Safar 1433 02:00:00 Heure normale de l’Europe de l’Est
int(0)
string(7) "islamic"
string(12) "Europe/Minsk"

dimanche 1 janvier 2012 00:00:00 UTC+00:00
bool(false)
string(9) "gregorian"
string(3) "UTC"

==DONE==

Diff

001+ dimanche 1 janvier 2012 02:00:00 Heure normale de l’Europe de l’Est
001- dimanche 1 janvier 2012 ap. J.-C. 03:00:00 UTC+03:00
006+ dimanche 8 Safar 1433 02:00:00 Heure normale de l’Europe de l’Est
006- dimanche 8 Safar 1433 AH 03:00:00 UTC+03:00
011+ dimanche 1 janvier 2012 00:00:00 UTC+00:00
011- dimanche 1 janvier 2012 ap. J.-C. 00:00:00 UTC

 

Generated at Sat, 27 Sep 2014 16:43:25 +0000 (4 days ago)

Copyright © 2005-2014 The PHP Group
All rights reserved.