![](/static/253f0d9b/assets/icons/icon-96x96.png)
![](https://programming.dev/pictrs/image/170721ad-9010-470f-a4a4-ead95f51f13b.png)
Leap seconds still make time go forwards, not backwards. NTP clients would also resolve small time discrepancies while still advancing forwards prior to the next time sync.
Leap seconds still make time go forwards, not backwards. NTP clients would also resolve small time discrepancies while still advancing forwards prior to the next time sync.
I didn’t say Unix time, I said UTC. And no it won’t report negative time, not unless somehow the system clock was modified while it was running…
UTC always goes forward regardless of the timezone and local time. That is why you should use it. To take my EPG situation above, I stored program start / end times in UTC so they would render properly even if DST kicked in or not during the middle of the program.
Yes as long as the rules are known, but it’s really just better to do things sanely and leave no margin of doubt.
True but so do most computers. Computers have a database of timezones and time offsets around the world. Depending on the UTC date and time, and your current timezone it will look up what offset to apply to show the local time. The database is very gnarly since rules change over time, e.g. maybe in the 70s some countries had longer DST to counteract oil shortages.
I once developed an electronic program guide for a cable TV company in New Zealand and I’d lose my mind if I had to use timezones. The basic rule of thumb was:
a) Internally you use UTC religiously. UTC is the same everywhere on Earth, time always goes forward, most languages have classes that represent instants, durations etc. In addition you make damned sure your server time is correct and UTC.
b) You only deal with timezones when presenting something to a user or taking input from a user
Prior to that I had worked for a US trading company that set all their servers to EST and was receiving trades through the system which expressed time & date ambiguously. Just had to assume everywhere that EST was the default but it was just dumb programming and I bet to this day every piece of code they develop has time bugs.
I wonder what would happen if Putin straight up offered to cover his debts? I expect Trump would actually accept that offer and his idiot base would see nothing wrong with it if he did.
I expect their logic is their review “curation” racket is a sideshow and the real money is selling information to agencies and sales companies.
I’ve never seen much reason to use a real name on Glassdoor. They demand visitors sign up to see information, and every logon it demands more details. So I am glad I used a throwaway account and I expect many others did too, or filled it in with junk. I hope their database is poisoned with garbage. I’m sure they will continue to turn the screws - using a mobile device? You MUST use our app etc. I hope people realise that LinkedIn already sucks and here is something even worse moving into the same space.
From the article that they acquired a professional social networking app so their intention is clearly to be like LinkedIn - real names, links, career history, “social”. They want to monetize that information to sell to recruiters and salesmen.
So basically they’re nakedly greedy and they continue to suck. I thought LinkedIn was awful but Glassdoor is a whole new level of awful.
Glassdoor is little more than a shakedown service like Yelp or Tripadvisor. It looks superficially useful but the real purpose is to suck information out of users to monetize, and extort businesses for $$$ for review “curation”.
Rust isn’t really OOP like C#, Java or C++ - it has structs with functions that you could consider an “object” but there is no inheritance. Instead Rust uses traits which are a little bit like interfaces in some languages.
The way the kernel is using Rust at the moment is to produce safe bindings for modules to be written in Rust, i.e. you can create a module in Rust source which will be correctly loaded up, the code is safe by default and will have access to kernel services via bindings. I expect over time that more of the kernel will become Rust, but the biggest impediment right now is Rust relies on LLVM and LLVM only supports a subset of targets that a kernel could potentially support with another compiler like gcc.
Predominantly C. But even the kernel is beginning to use Rust as a way of avoiding entire classes of programming error.
The only reason people use JS is because it’s the defacto language of browsers. As a language it’s dogshit filled with all kinds of unpleasant traps.
Here is a fun one I discovered the other day:
new Date('2022-10-9').toUTCString() === 'Sat, 08 Oct 2022 23:00:00 GMT'
new Date('2022-10-09').toUTCString() === 'Sun, 09 Oct 2022 00:00:00 GMT'
So padding a day of the month with a 0 or not changes the result by 1 hour. Every browser does the same so I assume this is a legacy thing. It’s supposed to be padded but any sane language would throw an exception if it was malformed. Not JavaScript.
Lemmy is written in Rust. There might be bits of C at the periphery behind bindings.
Police in other countries don’t face an epidemic of guns, crime, homelessness, drugs and mental health issues. If the US wasn’t so dysfunctional and actually attempted to tackle these issues in a holistic way then I assume the role of cops would also change. But right now it is not that way. They are trained so if someone comes at them with a knife, or draws a weapon to threaten the cop or somebody else, they WILL shoot. Watch the body cam footage on https://www.youtube.com/@PoliceActivity/videos or the state cop channel of your choice and you’ll see exactly why.
And to repeat what I said somewhere else, I’m not on the cop’s side, but I am on the side of full disclosure and body cam footage to show context. I support defunding the police - although, not the name which is a fantastically stupid way to describe it - but supporting mental health services, tackling drugs & recidivism and other assistance would mean less people in these confrontations.
I’ve seen plenty of clips where the cops are in the wrong. Idiot cops firing pistols by accident or shooting in the absence of imminent threat. And that’s why I support body worn cameras and full disclosure. Is is also why I am extremely skeptical of newspapers jumping to conclusions in the absence of the footage. It is very easy for relatives of the deceased to decry the cops as racist, or trigger happy and it be reported as such. And then the footage comes out and it shows something completely different.
Most major police forces in the US release footage of officer involved shootings. I think predominantly they show the police using lethal force appropriately. There are some occasions where they clearly don’t, or where you wonder how it got to the situation where the cops were put in a position to have to defend themselves from somebody that the system could have helped.
A lot of people voting me down very clearly know the truth because the newspaper told them so. Despite lacking the footage to make that judgement.
It doesn’t work like that. UTC goes forward always. Leap seconds are scheduled and known in advance. NTP time services will just smear time advancement a little to account for an additional second. Time never has to go backwards. This is how Google does it.