mirror of
https://git.adityakumar.xyz/hugo-theme-introduction.git
synced 2024-12-22 22:52:54 +00:00
11 lines
328 B
JavaScript
11 lines
328 B
JavaScript
$(document).ready(function() {
|
|
const tnode = $("#time")
|
|
const update_localtime = function(){
|
|
var time = moment()
|
|
.tz(tnode.attr("data-time-zone"))
|
|
.format(tnode.attr("data-time-format"));
|
|
tnode.html(time);
|
|
}
|
|
update_localtime();
|
|
setInterval(update_localtime, 1000);
|
|
})
|