aboutsummaryrefslogtreecommitdiffstats
path: root/post/post.go
diff options
context:
space:
mode:
authorAdam Mathes <adam@trenchant.org>2017-02-09 21:16:23 -0800
committerAdam Mathes <adam@trenchant.org>2017-02-09 21:16:23 -0800
commit0f6f31b4cdccee59361e7e857cdf3340629cb348 (patch)
tree32c20f3836604b570277917331f851f9884ef7e0 /post/post.go
parentb3ecf2504a732f71122dadee1266c054466a07a2 (diff)
downloadsnkt-0f6f31b4cdccee59361e7e857cdf3340629cb348.tar.gz
snkt-0f6f31b4cdccee59361e7e857cdf3340629cb348.tar.bz2
snkt-0f6f31b4cdccee59361e7e857cdf3340629cb348.zip
parse time in local timezon context
Diffstat (limited to 'post/post.go')
-rw-r--r--post/post.go2
1 files changed, 1 insertions, 1 deletions
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