News for hackers. Stuff that matters.
Re:Time.gov was upgraded today by Amorymeltzer on Friday February 07, 2020 @08:54PM (#22273178)
I can't comment on accessibility or responsiveness or what have you, but this is a wonderful display. Strong, clear delineations without being too bright or garish, and densely packs a bunch of information together without losing clarity or concision. Love it.
Re:Time.gov was upgraded today by eganist on Friday February 07, 2020 @08:59PM (#22273206)
It's brilliant. And the front-end code, though not at all complicated, is clean and easy to understand. I can't speak for code quality, though.

NIST published an update to their About page for time.gov mid-week (https://www.nist.gov/pml/time-and-frequency-division/about-t... ); the only reason I know it was updated today or might've been late last night is because I used the old time.gov to set a watch the day before, and when I opened the tab today, the clock read:

    aN:aN:aN
---

The nice part is that save for the custom web analytics code from digitalgov.gov as well as jquery, it's not minimized.

Re:Time.gov was upgraded today by xwowsersx on Friday February 07, 2020 @10:22PM (#22273580)
Agreed, really brilliant. The way the different states are colored according to their time zone and then that color reaching out to the labels on top with those ray-like things is actually pretty clever.

Interesting to wonder how often are people needing to come up for a design for this type of information? Am I wrong to think not very often? My point is it's cool to see a design for something that isn't "solved" or that not many have ever really worked on.

Re:Time.gov was upgraded today by eganist on Friday February 07, 2020 @11:01PM (#22273755)
> The way the different states are colored according to their time zone and then that color reaching out to the labels on top with those ray-like things is actually pretty clever.

So the different components of this visualization genuinely solve a few different problems around color-blindness (necessary for 508 compliance is my guess, but I'm not an expert here)

Grab a screenshot (https://i.imgur.com/9ynIz5G.jpg) and drop it in here (https://www.color-blindness.com/coblis-color-blindness-simul...)

The only mode where any two zones next to each other are nearly identical is Red-blind/Protanopia (CMK identical, Y 8% higher in UTC-7 compared to UTC-8†). Monochromacy/Achromatopsia is a close second... and that's where the gradients to the clocks come in - even for those users, there's still a mechanism to distinguish those two zones.

I'd guess some serious usability research went into this.

---

† RGB, though more accurate since we're talking about a screen, would've been a little more complicated to compare in writing since only yellow changed between the two in CMYK

Re:Time.gov was upgraded today by jryb on Sunday February 09, 2020 @06:04PM (#22284948)
> I'd guess some serious usability research went into this.

I find that unlikely. If they just swapped the blue color of Alaska with the Mountain time zone there would be no ambiguity between adjacent colors at all for any type of color blindness.

Re:Time.gov was upgraded today by xwowsersx on Saturday February 08, 2020 @09:30AM (#22275864)
Very interesting, thanks for the color-blindness link.
Re:Time.gov was upgraded today by zingermc on Friday February 07, 2020 @09:02PM (#22273221)
Are those the last two characters of stringing NaN?
Re:Time.gov was upgraded today by eganist on Friday February 07, 2020 @09:04PM (#22273243)
yes!
Re:Time.gov was upgraded today by chipperyman573 on Friday February 07, 2020 @09:07PM (#22273262)
I wonder what the deal with them refreshing every 10 minutes is... This is at the bottom:

setInterval(function() {

   location.reload();
}, 600000);
Re:Time.gov was upgraded today by kijin on Friday February 07, 2020 @09:20PM (#22273336)
They're probably still tinkering with this and that, and the forced reload ensures that what's on the screen isn't too different from what they're actually serving even if users keep their tabs open all day long. If they change something, like moving a timezone boundary, they only need to wait 10 minutes before all clients are updated.

Moreover, any clock that updates itself in JS is also limited by the accuracy of the device's own clock. Periodic reloading ensures that the displayed time doesn't drift far from the server's clock. Of course they could do this by AJAX, but location.reload() also works fine if there's no client state worth preserving.

Re:Time.gov was upgraded today by corylulu on Friday February 07, 2020 @11:39PM (#22273918)
Yeah, should definitely be done with a XHR/Fetch call. Honestly, I would love if it updated through a websocket considering it's lower latency and can update far more often without the need for expensive HTTPS calls or a reliance on internal clocks.
Re:Time.gov was upgraded today by ascar on Saturday February 08, 2020 @04:26AM (#22274901)
I don't think their 10 minute update interval is based on the performance limitations of the HTTP protocol, but used because it's simply not necessary to do it more often.

Maintaining an open full duplex connection for a single fetch request every ten minutes sounds like terrible overengineering that in the end is probably much worse performance wise.

Both protocols use TCP as an underlying protocol. So the latency of the timedata from the final request should be pretty much the same (neglectible differences due to larger HTTP header that needs to be sent and parsed on receive). We don't really care about the additional round-trips before, because they don't affect the clockdrift.

However, if you really do care about the clockdrift due to client-server latency there are protocols like NTP that try to calculate that drift and minimize it.

Re:Time.gov was upgraded today by kortilla on Saturday February 08, 2020 @03:43AM (#22274753)
Sounds like pointless astronaut engineering. What problem do you think that would solve?
Re:Time.gov was upgraded today by eganist on Friday February 07, 2020 @09:11PM (#22273282)
My only guess is accounting for local clock drift.
Re:Time.gov was upgraded today by PoorlyDirected on Monday February 10, 2020 @11:20AM (#22290445)
Somewhere in the FAQ they indicate that NIST and the US Navy sync their clocks every 10 minutes. I'd wager that is why they refresh the webpage at that same frequency.
Re:Time.gov was upgraded today by datafatmunger on Saturday February 08, 2020 @01:33AM (#22274328)
They didn't upgrade their JS apparently. Could have been es6 arrow notation. :)
Re:Time.gov was upgraded today by collinmanderson on Monday February 10, 2020 @10:17AM (#22289778)
A lot of people still use IE11 which doesn't support arrow notation :/

Sadly, IE 11 isn't going away any time soon.

Re:Time.gov was upgraded today by NelsonMinar on Saturday February 08, 2020 @10:39AM (#22276261)
Pleased to see they retained support for properly displaying :60 seconds during the leap second.
Re:Time.gov was upgraded today by sneak on Friday February 07, 2020 @09:37PM (#22273417)
Why does time.gov need analytics? None of the usual reasons businesses cite as requiring them are valid here.
Re:Time.gov was upgraded today by eganist on Friday February 07, 2020 @09:41PM (#22273428)
The accountability of government to the people would be the primary reason, the idea being to show the value for the money you're being taxed.

But to answer your specific question, regardless of whether it's needed or not, it's mandatory. https://www.whitehouse.gov/sites/whitehouse.gov/files/omb/me... requirement #2

Re:Time.gov was upgraded today by mattmar96 on Friday February 07, 2020 @11:25PM (#22273863)
Interesting stuff. Surprised to see such tech literacy on the White House’s website.
Re:Time.gov was upgraded today by willis936 on Friday February 07, 2020 @11:41PM (#22273925)
The fed is also responsible for making ghidra. Not everyone working for the fed is a lawyer.
Re:Time.gov was upgraded today by toomuchtodo on Saturday February 08, 2020 @02:34PM (#22277842)
You shouldn't be. There are incredibly competent technologists currently in positions to deliver.

https://www.usds.gov/

https://18f.gsa.gov/

Re:Time.gov was upgraded today by acdha on Friday February 07, 2020 @09:45PM (#22273446)
Think a little deeper about that: the government doesn’t need to sell things but that doesn’t mean that the people building sites don’t care about knowing who’s visiting, what they do, or how the site performed. For example, when do you stop spending more money supporting old browsers?

There’s even an open source project around the public analytics.usa.gov dashboard:

https://github.com/18F/analytics.usa.gov

Re:Time.gov was upgraded today by sneak on Saturday February 08, 2020 @05:26PM (#22278945)
Why is it not okay when the NSA does it, but okay when the individual sub-organizations engage in domestic spying like this?

There is nothing special about visitors to .gov websites vs any other major website. You stop supporting old browsers when their installed base gets small enough; this has nothing to do with analytics or those specific sites under surveillance.

Re:Time.gov was upgraded today by acdha on Sunday February 09, 2020 @09:05AM (#22282140)
If you think this is what the NSA was doing, you should learn more about that. While you’re doing so, ask whether there’s a difference between the owner of a site getting basic visitor information or a third-party compromising other services to get far more personal information which they would otherwise not have access to. This is the difference between me noticing what type of car you drive when you visit and constantly recording every cars’ occupants, destination, and topics of conversation in the entire city.

Finally, you’re also wrong about how sites use analytics: global stats don’t matter much compared to your actual visitors, whose demographics can vary significantly. Every site I’ve worked on since the mid-90s has found that to be important enough to do basic analytics of the sit under discussion here.

Re:Time.gov was upgraded today by sneak on Sunday February 09, 2020 @03:28PM (#22284116)
This is silent, nonconsensual surveillance of large groups of people. Basically the same thing the NSA does, just in this case scoped to a specific website.

Calling it analytics doesn’t make it not mass surveillance.

It’s not okay when either group does it. I’m surprised to see that “the government should not spy on its citizens” is such a controversial belief.

Re:Time.gov was upgraded today by heartbreak on Saturday February 08, 2020 @11:02AM (#22276378)
You can view dot gov analytics here, by the way.

https://analytics.usa.gov/

Re:Time.gov was upgraded today by chrisseaton on Saturday February 08, 2020 @03:49AM (#22274769)
How come it uses AM and PM rather than 24-hours?
Re:Time.gov was upgraded today by gerikson on Saturday February 08, 2020 @05:11AM (#22275024)
Because that's the custom in the US.

Using 24 hours is "military time" there.

Re:Time.gov was upgraded today by spockz on Saturday February 08, 2020 @05:21AM (#22275055)
There is a toggle for switching it to a 24hour clock.
Re:Time.gov was upgraded today by rplnt on Saturday February 08, 2020 @05:18AM (#22275047)
You can switch to 24 hour format, but I can't confirm it works, because it's AM and it still does say AM.
Re:Time.gov was upgraded today by neurobro on Saturday February 08, 2020 @03:22AM (#22274694)
It looks like it was designed to fit perfectly above the fold on the screen, but then some manager (to put it mildly) came along and made them insert a useless grey bar at the top, pushing everything else down. Nothing a little "Block element..." can't fix, though.