boolean isDraftPost = isDraftPost();
long postTimeShift = getTimeShift();
Date postDate = new Date(htmlFile.getLastModifiedDate().getTime() + postTimeShift);
Entry e = new Entry();
e.setTitle(new PlainTextConstruct(title));
e.setDraft(isDraftPost);
e.setContent(new HtmlTextConstruct(htmlFile.getBody()));
java.util.TimeZone tz = getTimeZone();
if (tz == null)
throw new ArgumentNotSetException("timeZone");
Date pubDate = getPublishedDate()==null ? postDate : getPublishedDate();
Date edtDate = getEditedDate()==null ? postDate : getEditedDate();
Date updDate = getUpdatedDate()==null ? postDate : getUpdatedDate();
e.setPublished(new DateTime(pubDate, tz));
e.setEdited(new DateTime(edtDate, tz));
e.setUpdated(new DateTime(updDate, tz));
String blogId = getBlogID();
if (blogId == null)
throw new ArgumentNotSetException("blogID");