Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1134)

Unified Diff: milo/appengine/common/funcs.go

Issue 2835193006: Milo: Add timestamp name and tooltip (Closed)
Patch Set: Review Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | milo/appengine/frontend/expectations/buildbot.build-Debug_page-_CrWinGoma_30608.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: milo/appengine/common/funcs.go
diff --git a/milo/appengine/common/funcs.go b/milo/appengine/common/funcs.go
index dcf5e490dcb98d571b5832e2289f0e0ceb724cff..805ebeadc536ed3b63c0c54e330fbee212f13998 100644
--- a/milo/appengine/common/funcs.go
+++ b/milo/appengine/common/funcs.go
@@ -30,6 +30,7 @@ var funcMap = template.FuncMap{
"sub": sub,
"consoleHeader": consoleHeader,
"pagedURL": pagedURL,
+ "formatTime": formatTime,
}
// localTime returns a <span> element with t in human format
@@ -158,6 +159,11 @@ func parseRFC3339(s string) time.Time {
return time.Time{}
}
+// formatTime takes a time object and returns a formatted RFC3339 string.
+func formatTime(t time.Time) string {
+ return t.Format(time.RFC3339)
+}
+
// linkifyTemplate is the template used in "linkify". Because the template,
// itself recursively invokes "linkify", we will initialize it in explicitly
// in "init()".
« no previous file with comments | « no previous file | milo/appengine/frontend/expectations/buildbot.build-Debug_page-_CrWinGoma_30608.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698