summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@sbcglobal.net>2016-11-21 11:41:50 -0500
committerLuke Shumaker <lukeshu@sbcglobal.net>2016-11-21 11:41:50 -0500
commit0c8f3ee46a03dd3ca1f39090fb44732523e891c0 (patch)
tree616971ce937a9e8252c39063f62e63f65246004c
parentb772eb66f2862fbecd6c9fd024381299baaabb66 (diff)
derp, i am dum
-rw-r--r--crtsh-pem2html.go8
-rw-r--r--tls-pem2html.go8
2 files changed, 8 insertions, 8 deletions
diff --git a/crtsh-pem2html.go b/crtsh-pem2html.go
index f856ffb..612e421 100644
--- a/crtsh-pem2html.go
+++ b/crtsh-pem2html.go
@@ -30,7 +30,7 @@ var tmpl = template.Must(template.New("pem2html").
Funcs(template.FuncMap{
"red": red,
"green": green,
- "time": fTime,
+ "date": fDate,
"datetime": fDateTime,
}).Parse(`<!DOCTYPE html>
<html lang="en">
@@ -98,8 +98,8 @@ var tmpl = template.Must(template.New("pem2html").
{{range $cert := .certs}}
<tr>
<td style="background-color: {{$cert.Updated | green}}"><a target="_blank" href="{{$cert.Url}}">{{$cert.Updated | datetime}}</a></td>
- <td><a target="_blank" href="{{$cert.Url}}">{{$cert.X509.NotBefore | time}}</a></td>
- <td style="background-color: {{$cert.X509.NotAfter | red}}"><a target="_blank" href="{{$cert.Url}}">{{$cert.X509.NotAfter | time}}</a></td>
+ <td><a target="_blank" href="{{$cert.Url}}">{{$cert.X509.NotBefore | date}}</a></td>
+ <td style="background-color: {{$cert.X509.NotAfter | red}}"><a target="_blank" href="{{$cert.Url}}">{{$cert.X509.NotAfter | date}}</a></td>
<td><a target="_blank" href="{{$cert.Url}}">{{$cert.X509.Subject.CommonName}}</a></td>
<td><a target="_blank" href="{{$cert.Url}}">{{$cert.X509.Issuer.Organization}}</a></td>
</tr>
@@ -109,7 +109,7 @@ var tmpl = template.Must(template.New("pem2html").
</html>
`))
-func fTime(t time.Time) template.HTML {
+func fDate(t time.Time) template.HTML {
return template.HTML(t.Local().Format("<time datetime=\"2006-01-02 15:04:05\" title=\"2006-01-02 15:04:05\">2006-01-02 <span class=time>15:04:05</span></time>"))
}
diff --git a/tls-pem2html.go b/tls-pem2html.go
index 6cecbf6..f3581fd 100644
--- a/tls-pem2html.go
+++ b/tls-pem2html.go
@@ -30,7 +30,7 @@ var tmpl = template.Must(template.New("pem2html").
Funcs(template.FuncMap{
"red": red,
"green": green,
- "time": fTime,
+ "date": fDate,
"datetime": fDateTime,
}).Parse(`<!DOCTYPE html>
<html lang="en">
@@ -99,8 +99,8 @@ var tmpl = template.Must(template.New("pem2html").
</tr>
{{range $cert := .certs}}
<tr class="{{$cert.Class}}">
- <td style="background-color: {{$cert.X509.NotBefore | green}}"><a href="{{$cert.Url}}" title="{{$cert.Error}}">{{$cert.X509.NotBefore | time}}</a></td>
- <td style="background-color: {{$cert.X509.NotAfter | red }}"><a href="{{$cert.Url}}" title="{{$cert.Error}}">{{$cert.X509.NotAfter | time}}</a></td>
+ <td style="background-color: {{$cert.X509.NotBefore | green}}"><a href="{{$cert.Url}}" title="{{$cert.Error}}">{{$cert.X509.NotBefore | date}}</a></td>
+ <td style="background-color: {{$cert.X509.NotAfter | red }}"><a href="{{$cert.Url}}" title="{{$cert.Error}}">{{$cert.X509.NotAfter | date}}</a></td>
<td><a href="{{$cert.Url}}" title="{{$cert.Error}}">{{$cert.X509.Subject.CommonName | html}}</a></td>
<td><a href="{{$cert.Url}}" title="{{$cert.Error}}">{{$cert.Socket | html}}</a></td>
</tr>
@@ -110,7 +110,7 @@ var tmpl = template.Must(template.New("pem2html").
</html>
`))
-func fTime(t time.Time) template.HTML {
+func fDate(t time.Time) template.HTML {
return template.HTML(t.Local().Format("<time datetime=\"2006-01-02 15:04:05\" title=\"2006-01-02 15:04:05\">2006-01-02 <span class=time>15:04:05</span></time>"))
}