Use ISO 8601 formatting for dates in filters

This commit is contained in:
Tim Schaub
2012-10-24 11:16:29 -06:00
parent 1c39820eb1
commit ed66271be3
2 changed files with 41 additions and 1 deletions

View File

@@ -6,6 +6,7 @@
* @requires OpenLayers/Format/Filter.js
* @requires OpenLayers/Format/XML.js
* @requires OpenLayers/Filter/Function.js
* @requires OpenLayers/BaseTypes/Date.js
*/
/**
@@ -405,7 +406,9 @@ OpenLayers.Format.Filter.v1 = OpenLayers.Class(OpenLayers.Format.XML, {
});
},
"Literal": function(value) {
// no ogc:expression handling for now
if (value instanceof Date) {
value = OpenLayers.Date.toISOString(value);
}
return this.createElementNSPlus("ogc:Literal", {
value: value
});