aboutsummaryrefslogtreecommitdiff
path: root/client.go
diff options
context:
space:
mode:
authorKushBlazingJudah <59340248+KushBlazingJudah@users.noreply.github.com>2021-08-19 11:45:16 -0300
committerKushBlazingJudah <59340248+KushBlazingJudah@users.noreply.github.com>2021-08-19 11:45:16 -0300
commit6f8744c1ad53b4056dc6245f8ac6b5fb903aef8f (patch)
tree16ebf235044be87d3d37dcb22bb4a49bd141c191 /client.go
parenta4801a3c1680ea63e264ead5acb9e6285b25ad07 (diff)
data-utc
Diffstat (limited to 'client.go')
-rw-r--r--client.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/client.go b/client.go
index 79e4bb1..d45e72d 100644
--- a/client.go
+++ b/client.go
@@ -111,6 +111,10 @@ func timeToReadableLong(t time.Time) string {
return t.Format("01/02/06(Mon)03:04:05")
}
+func timeToUnix(t time.Time) string {
+ return fmt.Sprint(t.Unix())
+}
+
func IndexGet(w http.ResponseWriter, r *http.Request, db *sql.DB) {
t := template.Must(template.New("").Funcs(template.FuncMap{
"mod": mod,
@@ -259,6 +263,7 @@ func OutboxGet(w http.ResponseWriter, r *http.Request, db *sql.DB, collection Co
return i + j
},
"timeToReadableLong": timeToReadableLong,
+ "timeToUnix": timeToUnix,
"sub": sub}).ParseFiles("./static/main.html", "./static/nposts.html", "./static/top.html", "./static/bottom.html", "./static/posts.html"))
actor := collection.Actor
@@ -462,6 +467,7 @@ func PostGet(w http.ResponseWriter, r *http.Request, db *sql.DB) {
return template.HTML(link)
},
"timeToReadableLong": timeToReadableLong,
+ "timeToUnix": timeToUnix,
"sub": sub}).ParseFiles("./static/main.html", "./static/npost.html", "./static/top.html", "./static/bottom.html", "./static/posts.html"))
path := r.URL.Path