 
         for newTagString in tagsToAdd {
             try BlogTag.addTag(newTagString, to: post)
+        }
+        
+        if post.published {
+            post.lastEdited = Date()
+        }
+        else {
+            post.created = Date()
+            if let _ = publish {
+                post.published = true
+            }
         }
 
         try post.save()

        var post = post
        post.title = title
        post.contents = contents
        post.lastEdited = Date()
        if (post.slugUrl != slugUrl) {
            post.slugUrl = BlogPost.generateUniqueSlugUrl(from: slugUrl)
        }

        }
        else if let tagsStringArray = rawTags as? [String] {
            tagsArray = tagsStringArray.map { $0.makeNode() }
        }

        if let createPostErrors = validatePostCreation(title: rawTitle, contents: rawContents, slugUrl: rawSlugUrl) {
