diff --git a/editor/editor.go b/editor/editor.go index 629cd777..896ac358 100644 --- a/editor/editor.go +++ b/editor/editor.go @@ -5,7 +5,6 @@ import ( "encoding/json" "errors" "io/ioutil" - "log" "net/http" "os" "path/filepath" @@ -110,12 +109,12 @@ func servePost(w http.ResponseWriter, r *http.Request, c *config.Config, filenam t, err := time.Parse("2006-01-02 15:04:05-07:00", rawFile["date"].(string)) if err != nil { - log.Print(err) + w.Write([]byte(err.Error())) return 500, err } scheduler := cron.New() - scheduler.AddFunc(t.Format("05 04 15 02 01 *"), func() { + scheduler.AddFunc(t.In(time.Now().Location()).Format("05 04 15 02 01 *"), func() { // Set draft to false rawFile["draft"] = false diff --git a/hugo.go b/hugo.go index 8761d8e2..e67a343d 100644 --- a/hugo.go +++ b/hugo.go @@ -1,3 +1,4 @@ +//go:generate go get github.com/jteeuwen/go-bindata //go:generate go-bindata -pkg assets -o assets/assets.go templates/ assets/css/ assets/js/ assets/fonts/ package hugo