70

Since the Stack Exchange sites run on one clock, and a clock that is not common to most of us (such as those of us in the US), can we display a clock with the site time (UTC) displayed somewhere on every page, such as at the bottom with the other text? That way we are more aware of when the days turn over, and ecetera...

close votes, delete votes, flags, and normal votes would also benefit from this as well (thanks @Grace Note!)...

alt text

What do you guys think? yea or nay? thoughts?

7
  • 1
    you can already mouseover recent comments to get their UTC timestamp. That's what I use. If you haven't made any recent comments, I can't see why you care when rollover happens :) Commented Aug 31, 2010 at 0:19
  • 2
    @Philip Potter: I care, for reasons listed in @George Edison's post and, I want to know! :-)
    – studiohack
    Commented Aug 31, 2010 at 0:21
  • 7
    Why do timezones confuse people so much? Commented Aug 31, 2010 at 3:28
  • For those who can't get mouseover recent comments to work - you have to mouse over the '3 hours ago' text, not the comment itself. (Maybe it's just me who's dumb...)
    – Benjol
    Commented Aug 31, 2010 at 7:01
  • 19
    I would also like a compass
    – Shog9
    Commented Sep 29, 2010 at 4:04
  • 3
    For what it's worth, you could always just set your system clock to UTC. Commented Oct 6, 2010 at 21:15
  • 1
    @Jared: and change my entire lifestyle to revolve around UTC versus my normal timezone? :P
    – studiohack
    Commented Oct 7, 2010 at 20:48

9 Answers 9

40

This is an excellent idea! The timezone difference has caused everyone no end of headaches. Here is just a small sample of the benefits:

  • People complaining about the 'enthusiast' and 'fanatic' badge have no excuse now!
  • Reached the rep. cap? Look at the clock to see when you can get rep. again.

...and...

  • Since Jon Skeet lives in Reading, UK, we can now know with certainty when he's asleep and we can actually get rep!
9
  • 1
    exactly! I am very surprised that no one has thought of this before...
    – studiohack
    Commented Aug 31, 2010 at 0:13
  • 42
    Jon Skeet sleeps? lies!
    – MrABC
    Commented Aug 31, 2010 at 0:22
  • This would be so nice... Clicking on the today and yesterday tabs currently is so confusing. Having a clock visible would help greatly. Commented Aug 31, 2010 at 1:04
  • 4
    It wouldn't even have to be obvious. Somewhere in the footer, perhaps underneath the revision number would suffice I think. Commented Aug 31, 2010 at 2:01
  • @MrABC: boy, are you in for a surprise. meta.stackexchange.com/questions/555/…
    – Pops
    Commented Aug 31, 2010 at 5:28
  • Maybe a GreaseMonkey script is in order!!! Commented Aug 31, 2010 at 5:33
  • 1
    @Farseeker: ...and done! A GreaseMonkey script that does just that is below. Enjoy! Commented Aug 31, 2010 at 6:21
  • 4
    Pedantic: UK is not currently on UTC, we're UTC+1 being BST until the end of Oct.
    – Richard
    Commented Aug 31, 2010 at 8:38
  • 1
    You can also upgrade your second bullet for close votes, delete votes, flags, and normal votes as well. There's a whole lot that people run into and have to wonder when the end of the day is.
    – Grace Note StaffMod
    Commented Aug 31, 2010 at 12:37
44

In light of the new top bar, the position of the server clock has changed once again. As noted over in this guide, the position of the clock is now located in the Achievements Bar, which is that little bar graph item in the top left. Shown in the image below.

Image of new topbar clock

The information below is no longer relevant, but because I kept the older old clock available when we phased that out, I'm leaving this around too. ♪


Back then it was easier than what we had before back then! When you hover over your display name in the top bar, the dropdown will include a snapshot of the current time in UTC. It's no longer a click away.

Image of old dropdown

The below is deprecated because the system has long been removed, but for posterity's sake...


I notice that no one has pointed it out yet, but...

If you check your recent activity page by clicking on the envelope, it will tell you the current site time. This might satisfy the needs of anyone who can't use the GreaseMonkey script, for now.

Image of older old universal clock

2
  • 2
    I did not follow the dicussion to this, but is there a reason, why I have to even hover? Couldn't it be just visible the whole time between StackExchange- and User-Link or FAQ and Search?
    – Jook
    Commented Sep 25, 2012 at 8:26
  • This answer should be revised in light of the new top bar.
    – E.P.
    Commented Dec 7, 2013 at 19:10
11

And here it is!

Here is a GreaseMonkey script that does just that! It sticks a small little box to the bottom of every StackExchange page with the current UTC date / time.

alt text

// ==UserScript==
// @name          StackClock
// @namespace     http://quickmediasolutions.com
// @description   Shows a clock on StackOverflow with the current time in UTC.
// @include       http://stackoverflow.com/*
// @include       http://superuser.com/*
// @include       http://serverfault.com/*
// @include       http://meta.stackoverflow.com/*
// @include       http://*.stackexchange.com/*
// @require       http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js
// ==/UserScript==

var cur_date = new Date();

$("#footer-menu").after("<div style='color: white; padding: 4px; margin-left: 8px; background-color: #999; text-align: center; float: left;'>The current UTC<br>time is:<br><br><div id='utc-time'>" + cur_date.getUTCHours() + ":" + cur_date.getUTCMinutes() + "</div></div>");
7
  • 7
    This one is using the local clock, not the server clock. Not good enough! It might miss a few precious seconds!
    – Kobi
    Commented Aug 31, 2010 at 7:02
  • @Kobi: And your solution is.... ? Commented Aug 31, 2010 at 19:22
  • @George: Any chance using the recent activity page to get the current time (see above)? Commented Sep 1, 2010 at 1:05
  • @Changeling: What would be the purpose of that? Commented Sep 1, 2010 at 1:38
  • @George: To use the SO time and not local time Commented Sep 1, 2010 at 11:43
  • @Changeling: This uses SO time as it is. Commented Sep 1, 2010 at 17:46
  • @George Edison: Possible solution: Use a NTP client on your computer, most servers' clocks are synchronized through NTP. Ideally, using the same NTP servers would help, but you should get +-5 second accuracy even using different servers. Commented Oct 7, 2010 at 5:48
6

I suppose your suggestion is more applicable now that more Stack Exchange sites are getting off the ground, some of them not technical at all (e.g. Cooking), but a year ago my answer would have been a derisive "What, you call yourself a programmer and you don't know what time it is in UTC?!"

0
5

Typing UTC time into Google will tell you the current SE time.

0
2

Very good idea!
despite dealing with UTC is not such a big deal for me.
I (must) use it often at work and free time, but I would prefer having it at the top of the page :-)

2

Some more Greasemonkey User Scripts:

in the top bar, after the links and before the search box

// ==UserScript==
// @name           Stack Exchange Clock
// @namespace      http://stackexchange.com/
// @description    Display UTC clock on Stack Exchange sites.
// @include        http://stackoverflow.com/*
// @include        http://serverfault.com/*
// @include        http://superuser.com/*
// @include        http://stackapps.com/*
// @include        http://meta.stackoverflow.com/*
// @include        http://*.stackexchange.com/*
// ==/UserScript==

/* Generate the current time string in UTC. */
function get_time() {
    var today = new Date();
    var h = today.getUTCHours();
    var m = zero_pad(today.getUTCMinutes());
    var s = zero_pad(today.getUTCSeconds());

    return h + ":" + m + ":" + s + " UTC";
}

/* Add a leading zero if required. */
function zero_pad(number) {
    if (number >= 0 && number < 10) {
        return "0" + number;
    }
    return number;
}

/* Update the time display. */
function update_time() {
    var stamp = document.getElementById('utc-clock');
    stamp.innerHTML = get_time();
}

/* Generate the HTML element for the stamp and insert,
   wrap time in a link so that it matches nearby styles. */
var time_url = "http://www.wolframalpha.com/input/?i=current%20time";
var time_block = document.createElement("span");
var inner_s = "<span class='lsep'>|</span> ";
inner_s += "<a id='utc-clock' title='Current Time' href='";
inner_s += time_url + "'>...</a>";
time_block.innerHTML = inner_s;

var target = document.getElementById('hlinks-custom');
if (target) {
    target.parentNode.insertBefore(time_block, target.firstSibling);
}

var f = function() { update_time(); }
window.setInterval(f, 1000);

in the footer after the feedback link

// ==UserScript==
// @name           Stack Exchange Clock
// @namespace      http://stackexchange.com/
// @description    Display UTC clock on Stack Exchange sites.
// @include        http://stackoverflow.com/*
// @include        http://serverfault.com/*
// @include        http://superuser.com/*
// @include        http://stackapps.com/*
// @include        http://meta.stackoverflow.com/*
// @include        http://*.stackexchange.com/*
// ==/UserScript==

/* Generate the current time string in UTC. */
function get_time(prefix) {
    var today = new Date();
    var h = today.getUTCHours();
    var m = zero_pad(today.getUTCMinutes());
    var s = zero_pad(today.getUTCSeconds());

    return prefix + h + ":" + m + ":" + s + " UTC";
}

/* Add a leading zero if required. */
function zero_pad(number) {
    if (number >= 0 && number < 10) {
        return "0" + number;
    }
    return number;
}

/* Update the time display. */
function update_time() {
    var stamp = document.getElementById('utc-clock');
    stamp.innerHTML = get_time("current time: ");
}

/* Generate the HTML element for the stamp and insert,
   wrap time in a link to match the style of the menu items. */
var time_url = "http://www.wolframalpha.com/input/?i=current%20time";
var time_block = document.createElement("span");
time_block.innerHTML = "| <a id='utc-clock' href='" + time_url + "'>...</a>";

var target = document.getElementById('footer-sites');
if (target) {
    target.parentNode.insertBefore(time_block, target);
}

var f = function() { update_time(); }
window.setInterval(f, 1000);
2

A Problem

I'm all for such a feature, but there's only one problem: if the timestamp is calculated server-side, this breaks caching!

Caching is one of the most important parts of making Stack Overflow run fast, so doing that might not be so good in the long run.

Of course, an alternative is to calculate the timestamp on the client. However, the time on client computers may be incorrect.

3
  • I guess it could be ajaxed?
    – Benjol
    Commented Sep 1, 2010 at 8:20
  • 3
    True, that's a good idea. Normally, I would say, "what if the client doesn't have JavaScript," but many features on Stack Overflow don't work without JavaScript anyway. Good suggestion! :) Commented Sep 1, 2010 at 22:07
  • 2
    Why does it break caching? First, it is only useful for registered users, which are the minority of visitors. Second, the reputation appears on the top of every page, and SO seems to work well with that (thought it doesn't change every second). It is possible to cache only parts of the page or the data.
    – Kobi
    Commented Sep 6, 2010 at 5:01
2

Since the roll out of the new top bar, the universal time for all Stack Exchange sites has moved from the activity drop down to the top right of the achievements dropdown:

enter image description here

0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .