summaryrefslogtreecommitdiff
path: root/index_templ.go
diff options
context:
space:
mode:
Diffstat (limited to 'index_templ.go')
-rw-r--r--index_templ.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/index_templ.go b/index_templ.go
index ff198bb..f4b3f93 100644
--- a/index_templ.go
+++ b/index_templ.go
@@ -14,7 +14,7 @@ import "fmt"
import "time"
import "net/url"
-func index(ps []Post) templ.Component {
+func index(ps []Post, tz *time.Location) templ.Component {
return templ.ComponentFunc(func(ctx context.Context, templ_7745c5c3_W io.Writer) (templ_7745c5c3_Err error) {
templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templ_7745c5c3_W.(*bytes.Buffer)
if !templ_7745c5c3_IsBuffer {
@@ -31,7 +31,7 @@ func index(ps []Post) templ.Component {
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
- templ_7745c5c3_Err = posts(ps).Render(ctx, templ_7745c5c3_Buffer)
+ templ_7745c5c3_Err = posts(ps, tz).Render(ctx, templ_7745c5c3_Buffer)
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
@@ -110,7 +110,7 @@ func uploadPage(csrfToken string) templ.Component {
})
}
-func posts(posts []Post) templ.Component {
+func posts(posts []Post, tz *time.Location) templ.Component {
return templ.ComponentFunc(func(ctx context.Context, templ_7745c5c3_W io.Writer) (templ_7745c5c3_Err error) {
templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templ_7745c5c3_W.(*bytes.Buffer)
if !templ_7745c5c3_IsBuffer {
@@ -158,9 +158,9 @@ func posts(posts []Post) templ.Component {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var6 string
- templ_7745c5c3_Var6, templ_7745c5c3_Err = templ.JoinStringErrs(post.CreatedAt.Format("2006-01-02 - 15:04"))
+ templ_7745c5c3_Var6, templ_7745c5c3_Err = templ.JoinStringErrs(post.CreatedAt.In(tz).Format("2006-01-02 - 15:04"))
if templ_7745c5c3_Err != nil {
- return templ.Error{Err: templ_7745c5c3_Err, FileName: `index.templ`, Line: 98, Col: 65}
+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `index.templ`, Line: 98, Col: 72}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var6))
if templ_7745c5c3_Err != nil {