From 2902996b8b2de81e34c2b86a35b312efe22c73e7 Mon Sep 17 00:00:00 2001 From: John Cardinal Date: Tue, 28 Apr 2020 20:52:57 +0000 Subject: [PATCH] --- source/Plugins/AyaNova.Plugin.V8/util.cs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/source/Plugins/AyaNova.Plugin.V8/util.cs b/source/Plugins/AyaNova.Plugin.V8/util.cs index be1382a..311e216 100644 --- a/source/Plugins/AyaNova.Plugin.V8/util.cs +++ b/source/Plugins/AyaNova.Plugin.V8/util.cs @@ -198,8 +198,13 @@ namespace AyaNova.PlugIn.V8 //make an event log entry to preserve the original v7 history such as it is public async static Task EventLog(int RavenType, long RavenId, long RavenCreatorId, long RavenModifierId, string sCreated, string sModified) { - DateTime Created = DateTime.Parse(sCreated).ToUniversalTime(); - DateTime Modified = DateTime.Parse(sModified).ToUniversalTime(); + DateTime Created = DateTime.UtcNow; + if(!string.IsNullOrWhiteSpace(sCreated)) + Created=DateTime.Parse(sCreated).ToUniversalTime(); + + DateTime Modified = DateTime.UtcNow; + if(!string.IsNullOrWhiteSpace(sCreated)) + Modified = DateTime.Parse(sModified).ToUniversalTime(); dynamic d = new JObject(); d.ayType = RavenType;