diff --git a/integrations/repo_test.go b/integrations/repo_test.go
index 872d3f24d1..c2ac6183f0 100644
--- a/integrations/repo_test.go
+++ b/integrations/repo_test.go
@@ -64,7 +64,7 @@ func testViewRepo(t *testing.T) {
}
})
- f.commitTime, _ = s.Find("span.time-since").Attr("title")
+ f.commitTime, _ = s.Find("span.time-since").Attr("data-content")
items = append(items, f)
})
diff --git a/modules/timeutil/since.go b/modules/timeutil/since.go
index 5e89b0faa2..8473d45051 100644
--- a/modules/timeutil/since.go
+++ b/modules/timeutil/since.go
@@ -234,7 +234,7 @@ func TimeSince(then time.Time, lang translation.Locale) template.HTML {
}
func htmlTimeSince(then, now time.Time, lang translation.Locale) template.HTML {
- return template.HTML(fmt.Sprintf(`%s`,
+ return template.HTML(fmt.Sprintf(`%s`,
then.In(setting.DefaultUILocation).Format(GetTimeFormat(lang.Language())),
timeSince(then, now, lang)))
}
@@ -245,7 +245,7 @@ func TimeSinceUnix(then TimeStamp, lang translation.Locale) template.HTML {
}
func htmlTimeSinceUnix(then, now TimeStamp, lang translation.Locale) template.HTML {
- return template.HTML(fmt.Sprintf(`%s`,
+ return template.HTML(fmt.Sprintf(`%s`,
then.FormatInLocation(GetTimeFormat(lang.Language()), setting.DefaultUILocation),
timeSinceUnix(int64(then), int64(now), lang)))
}
diff --git a/modules/timeutil/since_test.go b/modules/timeutil/since_test.go
index 8bdb9d7546..dfcf9cb01d 100644
--- a/modules/timeutil/since_test.go
+++ b/modules/timeutil/since_test.go
@@ -119,7 +119,7 @@ func TestHtmlTimeSince(t *testing.T) {
// test that `diff` yields a result containing `expected`
test := func(expected string, diff time.Duration) {
actual := htmlTimeSince(BaseDate, BaseDate.Add(diff), translation.NewLocale("en-US"))
- assert.Contains(t, actual, `title="Sat Jan 1 00:00:00 UTC 2000"`)
+ assert.Contains(t, actual, `data-content="Sat Jan 1 00:00:00 UTC 2000"`)
assert.Contains(t, actual, expected)
}
test("1 second", time.Second)
diff --git a/web_src/js/features/common-global.js b/web_src/js/features/common-global.js
index 259e409add..a3aebc0246 100644
--- a/web_src/js/features/common-global.js
+++ b/web_src/js/features/common-global.js
@@ -70,14 +70,6 @@ export function initGlobalTooltips() {
}
export function initGlobalCommon() {
- // Show exact time
- $('.time-since').each(function () {
- $(this)
- .addClass('tooltip')
- .attr('data-content', $(this).attr('title'))
- .attr('title', '');
- });
-
// Undo Safari emoji glitch fix at high enough zoom levels
if (navigator.userAgent.match('Safari')) {
$(window).resize(() => {