From 0f6f31b4cdccee59361e7e857cdf3340629cb348 Mon Sep 17 00:00:00 2001 From: Adam Mathes Date: Thu, 9 Feb 2017 21:16:23 -0800 Subject: parse time in local timezon context --- post/post.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'post') diff --git a/post/post.go b/post/post.go index 9561e46..5634340 100644 --- a/post/post.go +++ b/post/post.go @@ -137,7 +137,7 @@ func (p *Post) parse() { vlog.Printf("no date field in post %s, using file modification time\n", p.SourceFile) } else { var err error - p.Time, err = time.Parse("2006-1-2", date_str) + p.Time, err = time.ParseInLocation("2006-1-2", date_str, time.Local) if err != nil { // fallback is to use file modtime // should use create time but that doesn't seem to be in stdlib -- cgit v1.2.3