1
0
Fork 0
mirror of https://git.sr.ht/~seirdy/seirdy.one synced 2024-11-10 00:12:09 +00:00

Use UTC for all timestamps

This commit is contained in:
Rohan Kumar 2023-11-29 05:52:05 -08:00
parent 9923ebc34b
commit fb33951b8f
No known key found for this signature in database
GPG key ID: 1E892DB2A5F84479
11 changed files with 20 additions and 20 deletions

View file

@ -53,7 +53,7 @@
</author> </author>
<admin:errorReportsTo rdf:resource="mailto:{{ .Site.Author.email }}" /> <admin:errorReportsTo rdf:resource="mailto:{{ .Site.Author.email }}" />
<link rel="license" type="application/rdf+xml" href="https://creativecommons.org/licenses/by-sa/4.0/rdf" /> <link rel="license" type="application/rdf+xml" href="https://creativecommons.org/licenses/by-sa/4.0/rdf" />
<updated>{{ now.Format "2006-01-02T15:04:05-07:00" | safeHTML }}</updated> <updated>{{ site.LastChange.UTC.Format "2006-01-02T15:04:05-07:00" | safeHTML }}</updated>
<generator uri="https://gohugo.io/" version="{{ .Site.Hugo.Version }}">Hugo {{ .Site.Hugo.Version }}</generator> <generator uri="https://gohugo.io/" version="{{ .Site.Hugo.Version }}">Hugo {{ .Site.Hugo.Version }}</generator>
<id>{{ .Permalink }}</id> <id>{{ .Permalink }}</id>
{{ range $pages -}} {{ range $pages -}}
@ -62,8 +62,8 @@
<title>{{ .Title }}</title> <title>{{ .Title }}</title>
<link rel="alternate" type="text/html" href="{{ .Permalink }}" /> <link rel="alternate" type="text/html" href="{{ .Permalink }}" />
<id>{{ .Permalink }}</id> <id>{{ .Permalink }}</id>
<published>{{ .Date.Format "2006-01-02T15:04:05-07:00" | safeHTML }}</published> <published>{{ .Date.UTC.Format "2006-01-02T15:04:05-07:00" | safeHTML }}</published>
<updated>{{ .Lastmod.Format "2006-01-02T15:04:05-07:00" | safeHTML }}</updated> <updated>{{ .Lastmod.UTC.Format "2006-01-02T15:04:05-07:00" | safeHTML }}</updated>
<author><name>{{ .Site.Author.name }}</name><uri>https://seirdy.one/</uri></author> <author><name>{{ .Site.Author.name }}</name><uri>https://seirdy.one/</uri></author>
<rights>CC-BY-SA 4.0</rights> <rights>CC-BY-SA 4.0</rights>
<link rel="license" type="application/rdf+xml" href="https://creativecommons.org/licenses/by-sa/4.0/rdf" /> <link rel="license" type="application/rdf+xml" href="https://creativecommons.org/licenses/by-sa/4.0/rdf" />

View file

@ -33,7 +33,7 @@
<managingEditor>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</managingEditor>{{end}}{{ with .Site.Author.email }} <managingEditor>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</managingEditor>{{end}}{{ with .Site.Author.email }}
<webMaster>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</webMaster>{{end}}{{ with .Site.Copyright }} <webMaster>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</webMaster>{{end}}{{ with .Site.Copyright }}
<copyright>{{.}}</copyright>{{end}}{{ if not .Date.IsZero }} <copyright>{{.}}</copyright>{{end}}{{ if not .Date.IsZero }}
<lastBuildDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</lastBuildDate>{{ end }} <lastBuildDate>{{ .Date.UTC.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</lastBuildDate>{{ end }}
{{ with .OutputFormats.Get "RSS" }} {{ with .OutputFormats.Get "RSS" }}
{{ printf "<atom:link href=%q rel=\"self\" type=%q />" .Permalink .MediaType | safeHTML }} {{ printf "<atom:link href=%q rel=\"self\" type=%q />" .Permalink .MediaType | safeHTML }}
{{ end }} {{ end }}
@ -42,7 +42,7 @@
{{- .Page.Scratch.Set "codeIndex" 1 -}} {{- .Page.Scratch.Set "codeIndex" 1 -}}
<title>{{ .Title }}</title> <title>{{ .Title }}</title>
<link>{{ .Permalink }}</link> <link>{{ .Permalink }}</link>
<pubDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</pubDate> <pubDate>{{ .Date.UTC.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</pubDate>
{{ with .Site.Author.email }}<author>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</author>{{end}} {{ with .Site.Author.email }}<author>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</author>{{end}}
<guid>{{ .Permalink }}</guid> <guid>{{ .Permalink }}</guid>
<description xml:base="{{ .Permalink }}">{{- .Content | replaceRE `(?: )?(?:item(type|scope|prop|id|ref)="[^"]*"|class="language-figure")` "" | replaceRE `<meta content="true" ?/>` "" | html -}}</description> <description xml:base="{{ .Permalink }}">{{- .Content | replaceRE `(?: )?(?:item(type|scope|prop|id|ref)="[^"]*"|class="language-figure")` "" | replaceRE `<meta content="true" ?/>` "" | html -}}</description>

View file

@ -4,7 +4,7 @@
{{- if not .Params.private -}} {{- if not .Params.private -}}
<url> <url>
<loc>{{ .Permalink }}</loc> <loc>{{ .Permalink }}</loc>
<lastmod>{{ safeHTML ( .Lastmod.Format "2006-01-02T15:04:05-07:00" ) }}</lastmod>{{ with .Sitemap.ChangeFreq }} <lastmod>{{ safeHTML ( .Lastmod.UTC.Format "2006-01-02T15:04:05-07:00" ) }}</lastmod>{{ with .Sitemap.ChangeFreq }}
<changefreq>{{ . }}</changefreq>{{ end }}{{ if ge .Sitemap.Priority 0.0 }} <changefreq>{{ . }}</changefreq>{{ end }}{{ if ge .Sitemap.Priority 0.0 }}
<priority>{{ .Sitemap.Priority }}</priority>{{ end }} <priority>{{ .Sitemap.Priority }}</priority>{{ end }}
</url> </url>

View file

@ -21,9 +21,9 @@
</a> </a>
</h3> </h3>
<p> <p>
Posted <time itemprop="datePublished" class="dt-published published" datetime="{{ .Date.Format "2006-01-02 15:04:05Z07:00" }}">{{ .Date.Format "2006-01-02 15:04" }}</time> Posted <time itemprop="datePublished" class="dt-published published" datetime="{{ .Date.UTC.Format "2006-01-02 15:04:05Z07:00" }}">{{ .Date.UTC.Format "2006-01-02 15:04" }}</time>
{{- if gt (sub .Lastmod.Unix .Date.Unix) 3600 -}} {{- if gt (sub .Lastmod.Unix .Date.Unix) 3600 -}}
, updated <time{{ if not (.Params.evergreen) }} itemprop="dateModified" class="dt-updated updated"{{ end }} datetime="{{ .Lastmod.Format "2006-01-02 15:04:05Z07:00" }}">{{ .Lastmod.Format "2006-01-02 15:04" }}</time> , updated <time{{ if not (.Params.evergreen) }} itemprop="dateModified" class="dt-updated updated"{{ end }} datetime="{{ .Lastmod.UTC.Format "2006-01-02 15:04:05Z07:00" }}">{{ .Lastmod.UTC.Format "2006-01-02 15:04" }}</time>
{{- end }} {{- end }}
</p> </p>
<div> <div>

View file

@ -3,7 +3,7 @@
## Gemlog posts ## Gemlog posts
{{ range (where .Site.RegularPages "Section" "posts") }} {{ range (where .Site.RegularPages "Section" "posts") }}
{{- if .OutputFormats.Get "gemtext" }} {{- if .OutputFormats.Get "gemtext" }}
=> {{replace .Permalink "/gemini" "" 1}} {{ .Date.Format "2006-01-02" }}: {{.Title | safeHTML}}{{ end }}{{ end }} => {{replace .Permalink "/gemini" "" 1}} {{ .Date.UTC.Format "2006-01-02" }}: {{.Title | safeHTML}}{{ end }}{{ end }}
=> posts/index.xml RSS feed => posts/index.xml RSS feed

View file

@ -21,9 +21,9 @@
</a> </a>
</h3> </h3>
<p> <p>
Posted <time itemprop="datePublished" class="dt-published published" datetime="{{ .Date.Format "2006-01-02 15:04:05Z07:00" }}">{{ .Date.Format "2006-01-02 15:04" }}</time> Posted <time itemprop="datePublished" class="dt-published published" datetime="{{ .Date.UTC.Format "2006-01-02 15:04:05Z07:00" }}">{{ .Date.UTC.Format "2006-01-02 15:04" }}</time>
{{- if gt (sub .Lastmod.Unix .Date.Unix) 3600 -}} {{- if gt (sub .Lastmod.Unix .Date.Unix) 3600 -}}
, updated <time{{ if not (.Params.evergreen) }} itemprop="dateModified" class="dt-updated updated"{{ end }} datetime="{{ .Lastmod.Format "2006-01-02 15:04:05Z07:00" }}">{{ .Lastmod.Format "2006-01-02 15:04" }}</time> , updated <time{{ if not (.Params.evergreen) }} itemprop="dateModified" class="dt-updated updated"{{ end }} datetime="{{ .Lastmod.UTC.Format "2006-01-02 15:04:05Z07:00" }}">{{ .Lastmod.UTC.Format "2006-01-02 15:04" }}</time>
{{- end }} {{- end }}
</p> </p>
<div> <div>

View file

@ -48,10 +48,10 @@
<meta name="author" content="{{ .Site.Author.name }}" /> <meta name="author" content="{{ .Site.Author.name }}" />
<meta property="article:author" content="{{ .Site.Author.name }}" /> <meta property="article:author" content="{{ .Site.Author.name }}" />
{{ if and (gt .Date 0) (not .Params.evergreen) -}} {{ if and (gt .Date 0) (not .Params.evergreen) -}}
<meta property="article:published_time" content="{{ .Date.Format "2006-01-02T15:04:05Z07:00" }}" /> <meta property="article:published_time" content="{{ .Date.UTC.Format "2006-01-02T15:04:05Z07:00" }}" />
{{ end -}} {{ end -}}
{{ if lt .Date .Lastmod -}} {{ if lt .Date .Lastmod -}}
<meta property="article:modified_time" content="{{ .Lastmod.Format "2006-01-02T15:04:05Z07:00" }}" /> <meta property="article:modified_time" content="{{ .Lastmod.UTC.Format "2006-01-02T15:04:05Z07:00" }}" />
{{- end -}} {{- end -}}
<!--the Tor Browser's safest setting disables SVGs but still downloads them to avoid fingerprinting--> <!--the Tor Browser's safest setting disables SVGs but still downloads them to avoid fingerprinting-->
{{ if not (in site.BaseURL ".onion") -}} {{ if not (in site.BaseURL ".onion") -}}

View file

@ -25,11 +25,11 @@
<p> <p>
{{- end }} {{- end }}
{{ if $needsList }}<li>{{ end }} {{ if $needsList }}<li>{{ end }}
{{- $action }} <time{{ if not (.Params.evergreen) }} itemprop="dateCreated datePublished" class="dt-published published"{{ end }} datetime="{{ .Date.Format "2006-01-02T15:04:05Z07:00" }}">{{ .Date.Format "2006-01-02" }}</time> by {{ partial "indieweb-author.html" -}}{{ if not $shortMeta }} on his <a rel="canonical" itemprop="url" class="u-url url" href="{{ .Site.Params.CanonicalBaseURL }}{{ $canonicalRelPermalink }}">Website</a>{{- with .OutputFormats.Get "gemtext" -}}{{- printf " " -}}and <a rel="syndication" class="u-syndication" href="{{ $gemini }}">Gemini capsule</a>{{ end }}{{- end -}}. {{- $action }} <time{{ if not (.Params.evergreen) }} itemprop="dateCreated datePublished" class="dt-published published"{{ end }} datetime="{{ .Date.UTC.Format "2006-01-02T15:04:05Z07:00" }}">{{ .Date.UTC.Format "2006-01-02" }}</time> by {{ partial "indieweb-author.html" -}}{{ if not $shortMeta }} on his <a rel="canonical" itemprop="url" class="u-url url" href="{{ .Site.Params.CanonicalBaseURL }}{{ $canonicalRelPermalink }}">Website</a>{{- with .OutputFormats.Get "gemtext" -}}{{- printf " " -}}and <a rel="syndication" class="u-syndication" href="{{ $gemini }}">Gemini capsule</a>{{ end }}{{- end -}}.
{{ if $needsList }}</li>{{ end }} {{ if $needsList }}</li>{{ end }}
{{- if gt (sub .Lastmod.Unix .Date.Unix) 900 -}} {{- if gt (sub .Lastmod.Unix .Date.Unix) 900 -}}
{{ if $needsList }}<li>{{ end }} {{ if $needsList }}<li>{{ end }}
Last updated <time itemprop="dateModified" class="dt-updated updated" datetime="{{ .Lastmod.Format "2006-01-02T15:04:05Z07:00" }}">{{ .Lastmod.Format "2006-01-02" }}</time>.{{ if not $shortMeta }} <a href="{{ $logURL }}">Changelog</a>{{ end }} Last updated <time itemprop="dateModified" class="dt-updated updated" datetime="{{ .Lastmod.UTC.Format "2006-01-02T15:04:05Z07:00" }}">{{ .Lastmod.UTC.Format "2006-01-02" }}</time>.{{ if not $shortMeta }} <a href="{{ $logURL }}">Changelog</a>{{ end }}
{{ if $needsList }}</li>{{ end }} {{ if $needsList }}</li>{{ end }}
{{- end -}} {{- end -}}
{{- if not $isNotes -}} {{- if not $isNotes -}}

View file

@ -19,9 +19,9 @@
</a> </a>
</h3> </h3>
<p> <p>
Posted <time itemprop="datePublished" class="dt-published published" datetime="{{ .Date.Format "2006-01-02 15:04:05Z07:00" }}">{{ .Date.Format "2006-01-02" }}</time> Posted <time itemprop="datePublished" class="dt-published published" datetime="{{ .Date.UTC.Format "2006-01-02 15:04:05Z07:00" }}">{{ .Date.UTC.Format "2006-01-02" }}</time>
{{- if lt .Date .Lastmod -}} {{- if lt .Date .Lastmod -}}
, updated <time{{ if not (.Params.evergreen) }} itemprop="dateModified" class="dt-updated updated"{{ end }} datetime="{{ .Lastmod.Format "2006-01-02 15:04:05Z07:00" }}">{{ .Lastmod.Format "2006-01-02" }}</time> , updated <time{{ if not (.Params.evergreen) }} itemprop="dateModified" class="dt-updated updated"{{ end }} datetime="{{ .Lastmod.UTC.Format "2006-01-02 15:04:05Z07:00" }}">{{ .Lastmod.UTC.Format "2006-01-02" }}</time>
{{- end }} {{- end }}
</p> </p>

View file

@ -2,9 +2,9 @@
{{ $lastmod := .Lastmod -}} {{ $lastmod := .Lastmod -}}
{{ if lt .Date $lastmod -}} {{ if lt .Date $lastmod -}}
Originally posted {{ .Date.Format "2006-01-02" }}. Last updated {{ .Lastmod.Format "2006-01-02" }}. Originally posted {{ .Date.UTC.Format "2006-01-02" }}. Last updated {{ .Lastmod.UTC.Format "2006-01-02" }}.
{{ else -}} {{ else -}}
Posted {{ .Date.Format "2006-01-02" }}. Posted {{ .Date.UTC.Format "2006-01-02" }}.
{{ end }} {{ end }}
{{ trim (readFile (replace $.File.Path ".md" ".gmi")) "\n" | safeHTML }} {{ trim (readFile (replace $.File.Path ".md" ".gmi")) "\n" | safeHTML }}

View file

@ -5,7 +5,7 @@
{{- end -}} {{- end -}}
<p> <p>
This site was last built on This site was last built on
<time datetime="{{ $now.Format "2006-01-02T15:04:05-07:00" | safeHTML }}">{{ $now.Format "2006-01-02 15:04:05-07:00" | safeHTML }}</time> <time datetime="{{ $now.UTC.Format "2006-01-02T15:04:05-07:00" | safeHTML }}">{{ $now.UTC.Format "2006-01-02 15:04:05-07:00" | safeHTML }}</time>
by by
<a href="https://github.com/gohugoio/hugo/tree/{{ .Site.Hugo.CommitHash }}">Hugo {{ .Site.Hugo.Version }}</a> <a href="https://github.com/gohugoio/hugo/tree/{{ .Site.Hugo.CommitHash }}">Hugo {{ .Site.Hugo.Version }}</a>
{{ $buildCtx }}. {{ $buildCtx }}.