Use the xxxTxxxZ format for date fields in import/export.

--HG--
branch : dev
This commit is contained in:
Suha Can
2011-03-15 19:04:42 -07:00
parent cef8dbc4e7
commit 76af635ea8
4 changed files with 32 additions and 7 deletions

View File

@@ -1,4 +1,5 @@
using System;
using System.Xml;
using Orchard.ContentManagement;
using Orchard.ContentManagement.Drivers;
using Orchard.ContentManagement.Handlers;
@@ -84,7 +85,11 @@ namespace Orchard.PublishLater.Drivers {
}
protected override void Exporting(PublishLaterPart part, ExportContentContext context) {
context.Element(part.PartDefinition.Name).SetAttributeValue("ScheduledPublishUtc", part.ScheduledPublishUtc.Value);
var scheduled = part.ScheduledPublishUtc.Value;
if (scheduled != null) {
context.Element(part.PartDefinition.Name)
.SetAttributeValue("ScheduledPublishUtc", XmlConvert.ToString(scheduled.Value, XmlDateTimeSerializationMode.Utc));
}
}
}
}