Fix formatting of dates in XML. Fix name of ETag header.

This commit is contained in:
Andrew McMillan 2011-09-21 00:51:38 +12:00
parent 2608eef8e2
commit e149c7ebc7
25 changed files with 172 additions and 104 deletions

View File

@ -76,34 +76,60 @@ function expand_timezone_onsets( vCalendar $vResource, RepeatRuleDateTime $range
$dtstart_prop->SetParameterValue('TZID',$zone_tz);
$dtstart = new RepeatRuleDateTime( $dtstart_prop );
$is_date = $dtstart->isDate();
$instances[$dtstart->FloatOrUTC()] = $comp;
$instances[$dtstart->UTC('Y-m-d\TH:i:s\Z')] = $comp;
$rrule = $comp->GetProperty('RRULE');
$has_repeats = isset($rrule);
if ( !$has_repeats ) continue;
$instances += rrule_expand($dtstart, 'RRULE', $comp, $range_end);
if ( DEBUG_EXPAND ) {
print( "After rrule_expand");
foreach( $instances AS $k => $v ) {
print ' : '.$k;
$recur = $comp->GetProperty('RRULE');
if ( isset($recur) ) {
$recur = $recur->Value();
$this_start = clone($dtstart);
$rule = new RepeatRule( $this_start, $recur, $is_date );
$i = 0;
$result_limit = 1000;
while( $date = $rule->next() ) {
$instances[$date->UTC('Y-m-d\TH:i:s\Z')] = $comp;
if ( $i++ >= $result_limit || $date > $range_end ) break;
}
if ( DEBUG_EXPAND ) {
print( "After rrule_expand");
foreach( $instances AS $k => $v ) {
print ' : '.$k;
}
print "\n";
}
print "\n";
}
$instances += rdate_expand($dtstart, 'RDATE', $comp, $range_end);
if ( DEBUG_EXPAND ) {
print( "After rdate_expand");
foreach( $instances AS $k => $v ) {
print ' : '.$k;
$properties = $comp->GetProperties('RDATE');
if ( count($properties) ) {
foreach( $properties AS $p ) {
$timezone = $p->GetParameterValue('TZID');
$rdate = $p->Value();
$rdates = explode( ',', $rdate );
foreach( $rdates AS $k => $v ) {
$rdate = new RepeatRuleDateTime( $v, $timezone, $is_date);
if ( $return_floating_times ) $rdate->setAsFloat();
$instances[$rdate->UTC('Y-m-d\TH:i:s\Z')] = $comp;
if ( $rdate > $range_end ) break;
}
}
if ( DEBUG_EXPAND ) {
print( "After rdate_expand");
foreach( $instances AS $k => $v ) {
print ' : '.$k;
}
print "\n";
}
print "\n";
}
}
ksort($instances);
$onsets = array();
$start_utc = $range_start->FloatOrUTC();
$end_utc = $range_end->FloatOrUTC();
$start_utc = $range_start->UTC('Y-m-d\TH:i:s\Z');
$end_utc = $range_end->UTC('Y-m-d\TH:i:s\Z');
foreach( $instances AS $utc => $comp ) {
if ( $utc > $end_utc ) {
if ( DEBUG_EXPAND ) printf( "We're done: $utc is out of the range.\n");
@ -124,7 +150,7 @@ function expand_timezone_onsets( vCalendar $vResource, RepeatRuleDateTime $range
return $onsets;
}
header( 'Etag: "'.$tz->etag.'"' );
header( 'ETag: "'.$tz->etag.'"' );
header( 'Last-Modified', $tz->last_modified );
header('Content-Type: application/xml; charset="utf-8"');
@ -132,7 +158,7 @@ $vtz = new vCalendar($tz->vtimezone);
$response = new XMLDocument(array("urn:ietf:params:xml:ns:timezone-service" => ""));
$timezones = $response->NewXMLElement('urn:ietf:params:xml:ns:timezone-service:timezones');
$timezones->NewElement('dtstamp', gmdate('Ymd\THis\Z'));
$timezones->NewElement('dtstamp', gmdate('Y-m-d\TH:i:s\Z'));
$from = new RepeatRuleDateTime($start);
$until = new RepeatRuleDateTime($end);

View File

@ -43,7 +43,7 @@ if ( $qry->QDo('SELECT * FROM tz_localnames WHERE our_tzno = :our_tzno', array('
}
}
header( 'Etag: "'.$tz->etag.'"' );
header( 'ETag: "'.$tz->etag.'"' );
header( 'Last-Modified', $tz->last_modified );
$request->DoResponse(200, $vtz->Render(), 'text/calendar');

View File

@ -13,9 +13,9 @@ require_once('vComponent.php');
$response = new XMLDocument( array("urn:ietf:params:xml:ns:timezone-service" => "") );
$tzlist = $response->NewXMLElement('timezone-list');
$tzlist->NewElement('dtstamp', gmdate('Ymd\THis\Z'));
$tzlist->NewElement('dtstamp', gmdate('Y-m-d\TH:i:s\Z'));
$sql = 'SELECT our_tzno, tzid, active, to_char(last_modified AT TIME ZONE \'UTC\',\'YYYYMMDD\"T\"HH24MISS"Z"\') AS last_modified, olson_name, vtimezone FROM timezones';
$sql = 'SELECT our_tzno, tzid, active, to_char(last_modified AT TIME ZONE \'UTC\',\'YYYY-MM-DD\"T\"HH24:MI:SS"Z"\') AS last_modified, olson_name, vtimezone FROM timezones';
$params = array();
$where = '';
if ( $returnall !== true ) {

View File

@ -1,6 +1,6 @@
HTTP/1.1 200 OK
Date: Dow, 01 Jan 2000 00:00:00 GMT
Content-Length: 2596
Content-Length: 2644
Content-Type: application/xml; charset="utf-8"
<?xml version="1.0" encoding="utf-8" ?>

View File

@ -5,5 +5,5 @@ TYPE=GET
URL=http://regression.host/tz.php?action=list&returnall&lang=en_US
HEAD
REPLACE=/dtstamp>[0-9TZ]{16}/dtstamp>all good/
REPLACE=/last-modified>[0-9TZ]{16}/last-modified>all good/
REPLACE=/dtstamp>[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}Z/dtstamp>all good/
REPLACE=/last-modified>[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}Z/last-modified>all good/

View File

@ -1,6 +1,6 @@
HTTP/1.1 200 OK
Date: Dow, 01 Jan 2000 00:00:00 GMT
Content-Length: 158
Content-Length: 162
Content-Type: application/xml; charset="utf-8"
<?xml version="1.0" encoding="utf-8" ?>

View File

@ -5,4 +5,4 @@ TYPE=GET
URL=http://regression.host/tz.php?action=list
HEAD
REPLACE=/dtstamp>[0-9TZ]{16}/dtstamp>all good/
REPLACE=/dtstamp>[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}Z/dtstamp>all good/

View File

@ -5,5 +5,5 @@ TYPE=GET
URL=http://regression.host/tz.php?action=list
HEAD
REPLACE=/dtstamp>[0-9TZ]{16}/dtstamp>all good/
REPLACE=/last-modified>[0-9TZ]{16}/last-modified>all good/
REPLACE=/dtstamp>[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}Z/dtstamp>all good/
REPLACE=/last-modified>[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}Z/last-modified>all good/

View File

@ -1,6 +1,6 @@
HTTP/1.1 200 OK
Date: Dow, 01 Jan 2000 00:00:00 GMT
Etag: "b6098dd509534c18b8bb8a979afa7df4"
ETag: "Some good etag"
Content-Length: 601
Content-Type: text/calendar

View File

@ -6,3 +6,4 @@ URL=http://regression.host/tz.php?action=get&tzid=Pacific/Auckland&lang=en_US
HEAD
REPLACE=/LAST-MODIFIED:[0-9TZ]{16}/LAST-MODIFIED:all good/
REPLACE=!ETag: "\S+"!ETag: "Some good etag"!

View File

@ -1,6 +1,6 @@
HTTP/1.1 200 OK
Date: Dow, 01 Jan 2000 00:00:00 GMT
Etag: "0db80e352e12f15a4cceab465c77671b"
ETag: "Some good etag"
Content-Length: 611
Content-Type: text/calendar

View File

@ -6,3 +6,4 @@ URL=http://regression.host/tz.php?action=get&tzid=Europe/Madrid&lang=es_ES&forma
HEAD
REPLACE=/LAST-MODIFIED:[0-9TZ]{16}/LAST-MODIFIED:all good/
REPLACE=!ETag: "\S+"!ETag: "Some good etag"!

View File

@ -6,3 +6,4 @@ URL=http://regression.host/tz.php?action=get&tzid=Europe/London&lang=en_UK&forma
HEAD
REPLACE=/LAST-MODIFIED:[0-9TZ]{16}/LAST-MODIFIED:all good/
REPLACE=!ETag: "\S+"!ETag: "Some good etag"!

View File

@ -0,0 +1,9 @@
HTTP/1.1 403 Forbidden
Date: Dow, 01 Jan 2000 00:00:00 GMT
Content-Length: 148
Content-Type: text/xml; charset="utf-8"
<?xml version="1.0" encoding="utf-8" ?>
<error xmlns="DAV:">
<supported-format/>This server currently only supports text/calendar format.
</error>

View File

@ -0,0 +1,9 @@
#
# Get timezone with invalid format
#
TYPE=GET
URL=http://regression.host/tz.php?action=get&tzid=Pacific/Auckland&lang=pt_BR&format=text/html
HEAD
REPLACE=/LAST-MODIFIED:[0-9TZ]{16}/LAST-MODIFIED:all good/
REPLACE=!ETag: "\S+"!ETag: "Some good etag"!

View File

@ -0,0 +1,5 @@
HTTP/1.1 404 Not Found
Date: Dow, 01 Jan 2000 00:00:00 GMT
Content-Length: 0
Content-Type: text/plain; charset="utf-8"

View File

@ -0,0 +1,9 @@
#
# Request bogus timezone that will never exist
#
TYPE=GET
URL=http://regression.host/tz.php?action=get&tzid=US/Canada&lang=en_CA
HEAD
REPLACE=/LAST-MODIFIED:[0-9TZ]{16}/LAST-MODIFIED:all good/
REPLACE=!ETag: "\S+"!ETag: "Some good etag"!

View File

@ -1,7 +1,7 @@
HTTP/1.1 200 OK
Date: Dow, 01 Jan 2000 00:00:00 GMT
Etag: "e87a687e5f1f3b83389ac9472aea42ed"
Content-Length: 4042
ETag: "Some good etag"
Content-Length: 4134
Content-Type: application/xml; charset="utf-8"
<?xml version="1.0" encoding="utf-8" ?>
@ -12,133 +12,133 @@ Content-Type: application/xml; charset="utf-8"
<calscale>Gregorian</calscale>
<observance>
<name>NZST</name>
<onset>20110402T150000Z</onset>
<onset>2011-04-02T15:00:00Z</onset>
<utc-offset-from>+13:00</utc-offset-from>
<utc-offset-to>+12:00</utc-offset-to>
</observance>
<observance>
<name>NZDT</name>
<onset>20110924T140000Z</onset>
<onset>2011-09-24T14:00:00Z</onset>
<utc-offset-from>+12:00</utc-offset-from>
<utc-offset-to>+13:00</utc-offset-to>
</observance>
<observance>
<name>NZST</name>
<onset>20120331T150000Z</onset>
<onset>2012-03-31T15:00:00Z</onset>
<utc-offset-from>+13:00</utc-offset-from>
<utc-offset-to>+12:00</utc-offset-to>
</observance>
<observance>
<name>NZDT</name>
<onset>20120929T140000Z</onset>
<onset>2012-09-29T14:00:00Z</onset>
<utc-offset-from>+12:00</utc-offset-from>
<utc-offset-to>+13:00</utc-offset-to>
</observance>
<observance>
<name>NZST</name>
<onset>20130406T150000Z</onset>
<onset>2013-04-06T15:00:00Z</onset>
<utc-offset-from>+13:00</utc-offset-from>
<utc-offset-to>+12:00</utc-offset-to>
</observance>
<observance>
<name>NZDT</name>
<onset>20130928T140000Z</onset>
<onset>2013-09-28T14:00:00Z</onset>
<utc-offset-from>+12:00</utc-offset-from>
<utc-offset-to>+13:00</utc-offset-to>
</observance>
<observance>
<name>NZST</name>
<onset>20140405T150000Z</onset>
<onset>2014-04-05T15:00:00Z</onset>
<utc-offset-from>+13:00</utc-offset-from>
<utc-offset-to>+12:00</utc-offset-to>
</observance>
<observance>
<name>NZDT</name>
<onset>20140927T140000Z</onset>
<onset>2014-09-27T14:00:00Z</onset>
<utc-offset-from>+12:00</utc-offset-from>
<utc-offset-to>+13:00</utc-offset-to>
</observance>
<observance>
<name>NZST</name>
<onset>20150404T150000Z</onset>
<onset>2015-04-04T15:00:00Z</onset>
<utc-offset-from>+13:00</utc-offset-from>
<utc-offset-to>+12:00</utc-offset-to>
</observance>
<observance>
<name>NZDT</name>
<onset>20150926T140000Z</onset>
<onset>2015-09-26T14:00:00Z</onset>
<utc-offset-from>+12:00</utc-offset-from>
<utc-offset-to>+13:00</utc-offset-to>
</observance>
<observance>
<name>NZST</name>
<onset>20160402T150000Z</onset>
<onset>2016-04-02T15:00:00Z</onset>
<utc-offset-from>+13:00</utc-offset-from>
<utc-offset-to>+12:00</utc-offset-to>
</observance>
<observance>
<name>NZDT</name>
<onset>20160924T140000Z</onset>
<onset>2016-09-24T14:00:00Z</onset>
<utc-offset-from>+12:00</utc-offset-from>
<utc-offset-to>+13:00</utc-offset-to>
</observance>
<observance>
<name>NZST</name>
<onset>20170401T150000Z</onset>
<onset>2017-04-01T15:00:00Z</onset>
<utc-offset-from>+13:00</utc-offset-from>
<utc-offset-to>+12:00</utc-offset-to>
</observance>
<observance>
<name>NZDT</name>
<onset>20170923T140000Z</onset>
<onset>2017-09-23T14:00:00Z</onset>
<utc-offset-from>+12:00</utc-offset-from>
<utc-offset-to>+13:00</utc-offset-to>
</observance>
<observance>
<name>NZST</name>
<onset>20180331T150000Z</onset>
<onset>2018-03-31T15:00:00Z</onset>
<utc-offset-from>+13:00</utc-offset-from>
<utc-offset-to>+12:00</utc-offset-to>
</observance>
<observance>
<name>NZDT</name>
<onset>20180929T140000Z</onset>
<onset>2018-09-29T14:00:00Z</onset>
<utc-offset-from>+12:00</utc-offset-from>
<utc-offset-to>+13:00</utc-offset-to>
</observance>
<observance>
<name>NZST</name>
<onset>20190406T150000Z</onset>
<onset>2019-04-06T15:00:00Z</onset>
<utc-offset-from>+13:00</utc-offset-from>
<utc-offset-to>+12:00</utc-offset-to>
</observance>
<observance>
<name>NZDT</name>
<onset>20190928T140000Z</onset>
<onset>2019-09-28T14:00:00Z</onset>
<utc-offset-from>+12:00</utc-offset-from>
<utc-offset-to>+13:00</utc-offset-to>
</observance>
<observance>
<name>NZST</name>
<onset>20200404T150000Z</onset>
<onset>2020-04-04T15:00:00Z</onset>
<utc-offset-from>+13:00</utc-offset-from>
<utc-offset-to>+12:00</utc-offset-to>
</observance>
<observance>
<name>NZDT</name>
<onset>20200926T140000Z</onset>
<onset>2020-09-26T14:00:00Z</onset>
<utc-offset-from>+12:00</utc-offset-from>
<utc-offset-to>+13:00</utc-offset-to>
</observance>
<observance>
<name>NZST</name>
<onset>20210403T150000Z</onset>
<onset>2021-04-03T15:00:00Z</onset>
<utc-offset-from>+13:00</utc-offset-from>
<utc-offset-to>+12:00</utc-offset-to>
</observance>
<observance>
<name>NZDT</name>
<onset>20210925T140000Z</onset>
<onset>2021-09-25T14:00:00Z</onset>
<utc-offset-from>+12:00</utc-offset-from>
<utc-offset-to>+13:00</utc-offset-to>
</observance>

View File

@ -5,4 +5,5 @@ TYPE=GET
URL=http://regression.host/tz.php?action=expand&tzid=Pacific/Auckland
HEAD
REPLACE=/dtstamp>[0-9TZ]{16}/dtstamp>all good/
REPLACE=/dtstamp>[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}Z/dtstamp>all good/
REPLACE=!ETag: "\S+"!ETag: "Some good etag"!

View File

@ -1,7 +1,7 @@
HTTP/1.1 200 OK
Date: Dow, 01 Jan 2000 00:00:00 GMT
Etag: "60b52981cbe6fab393b6f40f24aec132"
Content-Length: 4720
ETag: "Some good etag"
Content-Length: 4828
Content-Type: application/xml; charset="utf-8"
<?xml version="1.0" encoding="utf-8" ?>
@ -12,157 +12,157 @@ Content-Type: application/xml; charset="utf-8"
<calscale>Gregorian</calscale>
<observance>
<name>EDT</name>
<onset>20090308T070000Z</onset>
<onset>2009-03-08T07:00:00Z</onset>
<utc-offset-from>-05:00</utc-offset-from>
<utc-offset-to>-04:00</utc-offset-to>
</observance>
<observance>
<name>EST</name>
<onset>20091101T070000Z</onset>
<onset>2009-11-01T07:00:00Z</onset>
<utc-offset-from>-04:00</utc-offset-from>
<utc-offset-to>-05:00</utc-offset-to>
</observance>
<observance>
<name>EDT</name>
<onset>20100314T070000Z</onset>
<onset>2010-03-14T07:00:00Z</onset>
<utc-offset-from>-05:00</utc-offset-from>
<utc-offset-to>-04:00</utc-offset-to>
</observance>
<observance>
<name>EST</name>
<onset>20101107T070000Z</onset>
<onset>2010-11-07T07:00:00Z</onset>
<utc-offset-from>-04:00</utc-offset-from>
<utc-offset-to>-05:00</utc-offset-to>
</observance>
<observance>
<name>EDT</name>
<onset>20110313T070000Z</onset>
<onset>2011-03-13T07:00:00Z</onset>
<utc-offset-from>-05:00</utc-offset-from>
<utc-offset-to>-04:00</utc-offset-to>
</observance>
<observance>
<name>EST</name>
<onset>20111106T070000Z</onset>
<onset>2011-11-06T07:00:00Z</onset>
<utc-offset-from>-04:00</utc-offset-from>
<utc-offset-to>-05:00</utc-offset-to>
</observance>
<observance>
<name>EDT</name>
<onset>20120311T070000Z</onset>
<onset>2012-03-11T07:00:00Z</onset>
<utc-offset-from>-05:00</utc-offset-from>
<utc-offset-to>-04:00</utc-offset-to>
</observance>
<observance>
<name>EST</name>
<onset>20121104T070000Z</onset>
<onset>2012-11-04T07:00:00Z</onset>
<utc-offset-from>-04:00</utc-offset-from>
<utc-offset-to>-05:00</utc-offset-to>
</observance>
<observance>
<name>EDT</name>
<onset>20130310T070000Z</onset>
<onset>2013-03-10T07:00:00Z</onset>
<utc-offset-from>-05:00</utc-offset-from>
<utc-offset-to>-04:00</utc-offset-to>
</observance>
<observance>
<name>EST</name>
<onset>20131103T070000Z</onset>
<onset>2013-11-03T07:00:00Z</onset>
<utc-offset-from>-04:00</utc-offset-from>
<utc-offset-to>-05:00</utc-offset-to>
</observance>
<observance>
<name>EDT</name>
<onset>20140309T070000Z</onset>
<onset>2014-03-09T07:00:00Z</onset>
<utc-offset-from>-05:00</utc-offset-from>
<utc-offset-to>-04:00</utc-offset-to>
</observance>
<observance>
<name>EST</name>
<onset>20141102T070000Z</onset>
<onset>2014-11-02T07:00:00Z</onset>
<utc-offset-from>-04:00</utc-offset-from>
<utc-offset-to>-05:00</utc-offset-to>
</observance>
<observance>
<name>EDT</name>
<onset>20150308T070000Z</onset>
<onset>2015-03-08T07:00:00Z</onset>
<utc-offset-from>-05:00</utc-offset-from>
<utc-offset-to>-04:00</utc-offset-to>
</observance>
<observance>
<name>EST</name>
<onset>20151101T070000Z</onset>
<onset>2015-11-01T07:00:00Z</onset>
<utc-offset-from>-04:00</utc-offset-from>
<utc-offset-to>-05:00</utc-offset-to>
</observance>
<observance>
<name>EDT</name>
<onset>20160313T070000Z</onset>
<onset>2016-03-13T07:00:00Z</onset>
<utc-offset-from>-05:00</utc-offset-from>
<utc-offset-to>-04:00</utc-offset-to>
</observance>
<observance>
<name>EST</name>
<onset>20161106T070000Z</onset>
<onset>2016-11-06T07:00:00Z</onset>
<utc-offset-from>-04:00</utc-offset-from>
<utc-offset-to>-05:00</utc-offset-to>
</observance>
<observance>
<name>EDT</name>
<onset>20170312T070000Z</onset>
<onset>2017-03-12T07:00:00Z</onset>
<utc-offset-from>-05:00</utc-offset-from>
<utc-offset-to>-04:00</utc-offset-to>
</observance>
<observance>
<name>EST</name>
<onset>20171105T070000Z</onset>
<onset>2017-11-05T07:00:00Z</onset>
<utc-offset-from>-04:00</utc-offset-from>
<utc-offset-to>-05:00</utc-offset-to>
</observance>
<observance>
<name>EDT</name>
<onset>20180311T070000Z</onset>
<onset>2018-03-11T07:00:00Z</onset>
<utc-offset-from>-05:00</utc-offset-from>
<utc-offset-to>-04:00</utc-offset-to>
</observance>
<observance>
<name>EST</name>
<onset>20181104T070000Z</onset>
<onset>2018-11-04T07:00:00Z</onset>
<utc-offset-from>-04:00</utc-offset-from>
<utc-offset-to>-05:00</utc-offset-to>
</observance>
<observance>
<name>EDT</name>
<onset>20190310T070000Z</onset>
<onset>2019-03-10T07:00:00Z</onset>
<utc-offset-from>-05:00</utc-offset-from>
<utc-offset-to>-04:00</utc-offset-to>
</observance>
<observance>
<name>EST</name>
<onset>20191103T070000Z</onset>
<onset>2019-11-03T07:00:00Z</onset>
<utc-offset-from>-04:00</utc-offset-from>
<utc-offset-to>-05:00</utc-offset-to>
</observance>
<observance>
<name>EDT</name>
<onset>20200308T070000Z</onset>
<onset>2020-03-08T07:00:00Z</onset>
<utc-offset-from>-05:00</utc-offset-from>
<utc-offset-to>-04:00</utc-offset-to>
</observance>
<observance>
<name>EST</name>
<onset>20201101T070000Z</onset>
<onset>2020-11-01T07:00:00Z</onset>
<utc-offset-from>-04:00</utc-offset-from>
<utc-offset-to>-05:00</utc-offset-to>
</observance>
<observance>
<name>EDT</name>
<onset>20210314T070000Z</onset>
<onset>2021-03-14T07:00:00Z</onset>
<utc-offset-from>-05:00</utc-offset-from>
<utc-offset-to>-04:00</utc-offset-to>
</observance>
<observance>
<name>EST</name>
<onset>20211107T070000Z</onset>
<onset>2021-11-07T07:00:00Z</onset>
<utc-offset-from>-04:00</utc-offset-from>
<utc-offset-to>-05:00</utc-offset-to>
</observance>

View File

@ -5,4 +5,6 @@ TYPE=GET
URL=http://regression.host/tz.php?action=expand&tzid=America/Indiana/Indianapolis&start=2009-01-01
HEAD
REPLACE=/dtstamp>[0-9TZ]{16}/dtstamp>all good/
REPLACE=/dtstamp>[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}Z/dtstamp>all good/
REPLACE=!ETag: "\S+"!ETag: "Some good etag"!

View File

@ -1,7 +1,7 @@
HTTP/1.1 200 OK
Date: Dow, 01 Jan 2000 00:00:00 GMT
Etag: "60b52981cbe6fab393b6f40f24aec132"
Content-Length: 1108
ETag: "Some good etag"
Content-Length: 1132
Content-Type: application/xml; charset="utf-8"
<?xml version="1.0" encoding="utf-8" ?>
@ -12,31 +12,31 @@ Content-Type: application/xml; charset="utf-8"
<calscale>Gregorian</calscale>
<observance>
<name>EDT</name>
<onset>20110313T070000Z</onset>
<onset>2011-03-13T07:00:00Z</onset>
<utc-offset-from>-05:00</utc-offset-from>
<utc-offset-to>-04:00</utc-offset-to>
</observance>
<observance>
<name>EST</name>
<onset>20111106T070000Z</onset>
<onset>2011-11-06T07:00:00Z</onset>
<utc-offset-from>-04:00</utc-offset-from>
<utc-offset-to>-05:00</utc-offset-to>
</observance>
<observance>
<name>EDT</name>
<onset>20120311T070000Z</onset>
<onset>2012-03-11T07:00:00Z</onset>
<utc-offset-from>-05:00</utc-offset-from>
<utc-offset-to>-04:00</utc-offset-to>
</observance>
<observance>
<name>EST</name>
<onset>20121104T070000Z</onset>
<onset>2012-11-04T07:00:00Z</onset>
<utc-offset-from>-04:00</utc-offset-from>
<utc-offset-to>-05:00</utc-offset-to>
</observance>
<observance>
<name>EDT</name>
<onset>20130310T070000Z</onset>
<onset>2013-03-10T07:00:00Z</onset>
<utc-offset-from>-05:00</utc-offset-from>
<utc-offset-to>-04:00</utc-offset-to>
</observance>

View File

@ -5,4 +5,6 @@ TYPE=GET
URL=http://regression.host/tz.php?action=expand&tzid=America/Indiana/Indianapolis&end=2013-07-01
HEAD
REPLACE=/dtstamp>[0-9TZ]{16}/dtstamp>all good/
REPLACE=/dtstamp>[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}Z/dtstamp>all good/
REPLACE=!ETag: "\S+"!ETag: "Some good etag"!

View File

@ -1,7 +1,7 @@
HTTP/1.1 200 OK
Date: Dow, 01 Jan 2000 00:00:00 GMT
Etag: "60b52981cbe6fab393b6f40f24aec132"
Content-Length: 1968
ETag: "Some good etag"
Content-Length: 2012
Content-Type: application/xml; charset="utf-8"
<?xml version="1.0" encoding="utf-8" ?>
@ -12,61 +12,61 @@ Content-Type: application/xml; charset="utf-8"
<calscale>Gregorian</calscale>
<observance>
<name>EDT</name>
<onset>20140309T070000Z</onset>
<onset>2014-03-09T07:00:00Z</onset>
<utc-offset-from>-05:00</utc-offset-from>
<utc-offset-to>-04:00</utc-offset-to>
</observance>
<observance>
<name>EST</name>
<onset>20141102T070000Z</onset>
<onset>2014-11-02T07:00:00Z</onset>
<utc-offset-from>-04:00</utc-offset-from>
<utc-offset-to>-05:00</utc-offset-to>
</observance>
<observance>
<name>EDT</name>
<onset>20150308T070000Z</onset>
<onset>2015-03-08T07:00:00Z</onset>
<utc-offset-from>-05:00</utc-offset-from>
<utc-offset-to>-04:00</utc-offset-to>
</observance>
<observance>
<name>EST</name>
<onset>20151101T070000Z</onset>
<onset>2015-11-01T07:00:00Z</onset>
<utc-offset-from>-04:00</utc-offset-from>
<utc-offset-to>-05:00</utc-offset-to>
</observance>
<observance>
<name>EDT</name>
<onset>20160313T070000Z</onset>
<onset>2016-03-13T07:00:00Z</onset>
<utc-offset-from>-05:00</utc-offset-from>
<utc-offset-to>-04:00</utc-offset-to>
</observance>
<observance>
<name>EST</name>
<onset>20161106T070000Z</onset>
<onset>2016-11-06T07:00:00Z</onset>
<utc-offset-from>-04:00</utc-offset-from>
<utc-offset-to>-05:00</utc-offset-to>
</observance>
<observance>
<name>EDT</name>
<onset>20170312T070000Z</onset>
<onset>2017-03-12T07:00:00Z</onset>
<utc-offset-from>-05:00</utc-offset-from>
<utc-offset-to>-04:00</utc-offset-to>
</observance>
<observance>
<name>EST</name>
<onset>20171105T070000Z</onset>
<onset>2017-11-05T07:00:00Z</onset>
<utc-offset-from>-04:00</utc-offset-from>
<utc-offset-to>-05:00</utc-offset-to>
</observance>
<observance>
<name>EDT</name>
<onset>20180311T070000Z</onset>
<onset>2018-03-11T07:00:00Z</onset>
<utc-offset-from>-05:00</utc-offset-from>
<utc-offset-to>-04:00</utc-offset-to>
</observance>
<observance>
<name>EST</name>
<onset>20181104T070000Z</onset>
<onset>2018-11-04T07:00:00Z</onset>
<utc-offset-from>-04:00</utc-offset-from>
<utc-offset-to>-05:00</utc-offset-to>
</observance>

View File

@ -5,4 +5,6 @@ TYPE=GET
URL=http://regression.host/tz.php?action=expand&tzid=America/Indiana/Indianapolis&start=2014-01-01&end=2018-12-31
HEAD
REPLACE=/dtstamp>[0-9TZ]{16}/dtstamp>all good/
REPLACE=/dtstamp>[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}Z/dtstamp>all good/
REPLACE=!ETag: "\S+"!ETag: "Some good etag"!