Leap Year Bugs Break Faulty Payment Systems
Вставка
- Опубліковано 29 лют 2024
- In this video I discuss how improper handling of dates in times can cause bugs that break different systems in special time/date cases like leapyears
My merch is available at
based.win/
Subscribe to me on Odysee.com
odysee.com/@AlphaNerd:8
₿💰💵💲Help Support the Channel by Donating Crypto💲💵💰₿
Monero
45F2bNHVcRzXVBsvZ5giyvKGAgm6LFhMsjUUVPTEtdgJJ5SNyxzSNUmFSBR5qCCWLpjiUjYMkmZoX9b3cChNjvxR7kvh436
Bitcoin
3MMKHXPQrGHEsmdHaAGD59FWhKFGeUsAxV
Ethereum
0xeA4DA3F9BAb091Eb86921CA6E41712438f4E5079
Litecoin
MBfrxLJMuw26hbVi2MjCVDFkkExz8rYvUF - Наука та технологія
It's insane to me how nameless priests in medieval Europe made such an accurate and useful calendar essentially the entire world uses it, and it remains useful and accurate
Even more insane to me is that the bases of the current calendar was personally made by Julius Caesar of all people,
Nah, the modern era has been pretty concentrated in discrediting and forgetting such names entirely on purpose, to instill modernism in the population and judging the past through a progressivist lens.
NEVER attribute to incompetence what you CAN trace down back to malice. The "Dark Age" is a ridiculous myth mostly to pretend that we just "found" the Greek secrets of the Bysantine empire all on our own and excavated it like crude oil.
Honestly I figure we should bring back some traditional REASONS to celebrate dates, like Halloween and Winter Solstice to slaughter animals and prepare to see some corpses. But the leap day could just such a celebration, a day off to remind ourselves of the fact that our technology is fallible, and reserve time to get the bugs fixed on the off-time from the usual schedule.
It's bad, nonsensical and only kind of works, 13 equal months + new years day makes so much more sense and makes everything more predictable, we're way overdue for a change.
They had good astronomers, plus a strong desire, even if that desire was based in religion.
@@BxPanda7 Time is continuous. What we need is a fundamental shift in how we perceive time. We shouldn't be measuring time using rational numbers seeing how we are occupied with the rotation and position of the earth relative to the sun. We should be measuring time in degrees.
It's like a timebomb counting down to the next leap day to see which programs implemented leap days appropriately. Every programmer should be aware of this and be prepared to make overtime fixes on leap days.
(sound of clockwork ticking in the background, tic tic tic tic!)
Things like this are ridiculously easy to test out.
9+10=21 time
Hurts
U stoopid
U stoopid
lmao
are you mewing to looksmaxx or is edging goated
Use a code library to handle date and time? Sorry champ, our security sector (Brendan, 23 years old, fresh graduate) says that you need to code it yourself. The deadline is 2 weeks.
This is why I look forward to leap years, is to see all the different services that didn't account for leap day go down. It is always so fun to watch.
i got paid a day early because they didnt wanna deal with that lol
some people just want to watch the world burn
@@vgg175you’re giving them too much credit. End of month may be hard coded to be 28th on Feb.
A dev knew about this issue but said "Meh, I'll get to it later".... Later never came, until the issue needed addressing.
Considering 1 year is the average length of a dev position even in top companies, it's a valid optimization technique. You at best not be rewarded for doing it "right" and at worst actively punished for it because of breaking deadlines and/or complicating the test suite. Bonus points you can take it as a one-off task later on even after leaving the company.
Tech debt = won't do until it causes problems
I think computer file did a video about time. Makes me really appreciate all the thousands of hours people have already put into solve these kinds of problems. 😂😂😂
Time and cryptography are things you shouldn't try to do yourself unless you really know what you're doing
@@MentalOutlaw Even if you do know what you're doing, it would still be a pain to implement, especially it if you don't have to
"The Problem with Time & Timezones", by Tom Scott. The conclusion is the same: never ever try to implement it yourself, just take a well-known library, import it, and don't even look in there, "because that way lies madness".
computer file
@@user-qm4ev6jb7d *lays (Sorry I had to)
I have a solar inverter whose monitoring app fails for a whole day twice a year when the clocks change in the US. I have reported the problem every year for 4 years in a row and it still isn't fixed. People/Corporations like this make me absolutely hate programming as a profession.
It still works, right?
The internet of shit soydevs ignore your pleas? Colour me shocked
thats hilarious
Typically companies will only make fixes like this if enough customers stop using their products/services AND notify the company as to why they are leaving as a customer.
When someone complains but keeps using the product…. The company doesn’t care to spend the money to fix it because you don’t care enough to stop using the product because of it.
It’s only a problem worth fixing once enough customers leave.
@@PatRiot-I think the difference here, is he HAS to use this product. It’s literally his job. He has no choice to use a faulty product.
I maintained a cash register software system at a big company for years. The BCD library we used for cash calculations was a little clumsy but I understood its importance and appreciated it. We had a guy try to be a hero and port all our code to another OS. We were horrified when we saw that he changed all currency handling to floating point. Luckily his work was thrown out. I cant imagine the grief we would have gotten from the accountants. Libraries are good!
Currency, at least for dollars, is integers when tallied in cents. Trying to tally dollars by floating point would be a disaster of random and mostly small round off errors. Though perhaps of less consequence that a voting machine using floating point.
I don't want to be that guy that looks at this man's work and says "skill issue" but it's very tempting
@@williamdrum9899 his work was rejected by upper MGMT for business reasons, so none of us had to face him.
@@hanelyp1 b a s e d
There is a reason we have _Decimal data types now. _Decimal32, _Decimal64, _Decimal128.
this is why you use holy c
Well I mean;
something something easier for a murderer to get into heaven rather then a rich dude, something something jesus hated the roman wealth and materialism, something something this is why we need to reject money and make a third temple, or something like that.
Behold! for there is no need for a third temple, there are no more sacrifices to be made. your life and your love of God and of your brothers and sisters is the only sacrifice to be made
@@twenty-fifth420 You both missed the joke _and_ misquoted a book in a single sentence, congrats.
But you gotta ask yourself: Is this too much voodoo for our purposes?
RIP Terry Davis
@@fus132 I dont read the bible and I was not serious because it WAS a joke.
So no I didnt miss it. Lighten up mate.
Edit: Also, it was clearly not a quote. It is called paraphasing.
got jump scared by a fucking spider, fucks sake.
For anybody wondering, it's like 3:00 to 3:10 roughly, dont take my word on it, it's somewhere in there.
Out here trynna eat some chicken wings while watching youtube and this big ass spider pulls up
Thankyouuuu so muchhh. I wont watch the video now. Im already at my breaking point lol glad im just 40 secs in
i would time stamp it but aracnophobia, lol@@funniefluffyfun9398
WHY DID HE SHOW UP @@gomi-hako
Why did I press the timestamp? Why?
I hate those beings more than anything
When anyone asks the time, I just tell them the unix epoch time and let them translate that themselves. Saves a lot of trouble.
99% of the time you process time as epoch, store it as an int.
Hope you'll enjoy the year of 2038.
@@ra2enjoyer708 I will with my 64bit epoch timestamps
Reminds me of that old Tom scott video where he had a rant about writing code about time zones.
Yup, a WAAAAAYYY deeper rabbit hole than you first expect when you start to implement a "simple" calendar/clock calculation function.
"How difficult can it be?", famous last words!
When you said "motorists" and "petrol" I almost went back to double-check I was in the right channel.
Nz calls gas petrol so was most likely quoting the article covering this
"Time is an illusion, lunchtime doubly so." - Ford Prefect, The Hitchhikers Guide to the Galaxy
Thanks to you, I am now absolutely in love with and obsessed with bugs that prevent the watch from showing time correctly now
Getting caught out by datetime. The one thing that unites developers young and old, new and experienced, JS and COBOL 😬
Kiwi here, Self service Pay at pump station you need to pay first before filling up.
Yes, but technically no. You just tap or insert your card and it will leave a pending transaction until you put the nozzle back (so it charges correctly for a fill).
But you only need to use the payment terminal first for self-serve or in dodgy areas.
the fruit or the bird?
@@cyr0_gd A citizen of New Zealand in this case -- it's an endearing nickname for New Zealand and it's inhabitants based off the kiwi bird to the best of my knowledge.
The fruit is always "kiwi fruit" here, I don't know why the rest of the world just calls the fruit "kiwi", as that is the bird or people to us. @@cyr0_gd
@@randomaccount53793just how it works here in the us if u pay at pump
Do system internal timekeeping in Unix millis and create a separate user-facing clock system so when/if it breaks it's a UI bug and not a system fault. The watch problem is less excusable.
There is no guarantee that the system time is "stable monotonic", meaning that system time can just jump back and forth and give erroneous results, so that would not be a straightforward solution.
Unix millis counts from system boot. You use epoch time.
@@oserodal2702 yup I used to have a laptop that would time travel in the system logs, really it was just the motherboard clock being out of sync from the actual. The system would then correct itself when connected to the Internet and gets a more accurate update.
@@tripplefives1402 Good points from both of you. It perhaps would have better to state that the clock the system runs on needs to be separated from the user-facing one and have a more standardized, stable ruleset.
That kinda just doubles the problem and gives it to a next person in 2038
Thank you Mental Outlaw for being one of my most beloved content creator
Same I always look forward to his videos
Never would I thought that Mental Outlaw would mention Waitomo
"perfect" pronounciation too
"why-tow-mow"
This is beyond topic but will never understand why he never discusses the Snowden leaks or why the American people continue to allow this.
Another one that impacted many users was the Sophos SSL/TLS decryption issue, where the February certificate expired on the 28th and the March certificate had not yet come into effect. This resulted in all users of the feature who had rebooted receiving "Your connection isn't private" errors in their browsers.
Just an addendum on the Swedish grocery franchising brand store in Sweden ICA, customers were still able to pay by cash (Sweden is one of the most cash free countries in the world), or the mobile phone number payment system Swish.
Ica, the Swedish grocery chain, run their own payment processing system since they also own a bank. Probably why nobody else was affected.
Pretty much nobody here carries cash, but luckily it was still possible to pay with Swish (a mobile payment system) so most people could still buy their groceries.
I suspect NZ is like the UK in that the payment processor at the pump reserves (in the UK, £100) enough to pay for the fuel, then adjusts the amount to the value of your fuel when the transaction is complete. It used to just give you a limit, regardless of how much credit you had in your account, which was obviously ripe for abuse.
"Open source RPG" is extremely charitable way to describe that abomination.
Was pretty surprised when he mentioned that game lol
Prude.
Abomination? How comes you to this conclusion?
Do you mean from a mechanic/programming standpoint?
From an it's an adult game stand point.
Or something different?
Contentwise. That shit's degenenrate.
In our case, we had problems with some chinese devices and a faulty SDK. Looking at the decompiled source-code of the library, it seems the programmer got mixed up in the function that returned the total days of the month between the 0-based array indexing for the typical days in the month array and the 1-based index to represent a month returned by whatever underlying C-library it queried. So he added 1 day to total days in the month if it was a leap year and if the month was 1, but that was January in this context.
I'm just happy that in NZ we are able to pay and fill up ourselves without any human contact, I heard some states in the US prevent you from this, and force employees to fill it.
Lots of fuel stations here are completely self-serve with just pumps and no building.
New Jersey outlaws self service. Oregon just started allowing it. Except for those exceptions, all stations have self-service and only small local stations even offer "full service". Most are just banks of self-serve pumps - (edit) but ALWAYS with a building and at least one employee on duty inside.
Sounds about right.
Although with us, just because hardly anyone is paid to supervise fuel pumps doesn't mean it saves us money.
Our petrol is the equivalent of nearly US$7 per gallon...
Pretty sure it's just new jersey
Yep. One old SQL report had a query which would get data up until a year but they instead used today's date parts -1 year completely disregarding the non existence of the 29th. I truly believe there's a ton of more issues that we are yet to be reported about lmao
Time is an illusion
it help things make sense
A construct of human perception
Lunchtime doubly so!
That's why we are living in present tense
Failing like that makes me wonder what other bugs and vulnerabilities made it out to the production system.
that spider jumpscare was so unnecessarry
The fact your brought up lilith's throne is wild. Also this is totally in character for the dev of that game, it's running on ancient java and at this point everything gets handled by volunteers.
The Gregorian Calendar repeats every 400 years. You can even calculate the weekday for every date in your head using a relatively simple algorithm. Pretty cool party trick...
How do you factor in the math of Gregorian calendar axing a week or two (depending on the country) in the past?
@@ra2enjoyer708You don't, you just assume the date is after that. For dates before, you can learn a separate algorithm for the Julian calendar.
I am one of those type of engineers that likes to build things with as little extra dependencies as possible (mainly because I am still learning) but I would never attempt to write my own time management library... I am not that crazy.
5:25 Waitomo (prounounced "Why - tow - mow") fuel stations are often card payments only, so there is no cash option. There are no attendants, or check out clerks.
6:38 New Zealanders pay before they fuel. Unless you're going to fill completely, then you ask the attendant to fill up / your card gets checked before you fill up.
Most areas (that aren't dodgy) you can fill up first. The exception is self service, where it can initiate a pending transaction so it can charge the correct amount for a fill.
Thanks for the video!
Seymour Papert passed in 2016 at age 88.
So now, two leap days later...
RIP Seymour Papert 1652-2016, Happy 90th birthday.
I'm amazed the game Lilith's throne got mentioned.
But I'm all for it!
Literally had this yesterday with Firewalls and CEF logs in Syslog going into our SIEM. CEF logs going into Sentinel doesn't know what year to put the leap day into. Literally nothing we could do and lost all Firewall syslogs for 24 hours.
That smartwatch part actually reminded me to switch the day on my regular watch from 31 to 2
I was looking at that exact page on the rust official documentation 20 min ago for my personal project.
the spider scared me so bad ive been paranoid ever since i saw a massive tarantula chilling in my house almost a year ago
we were returning in the middle of the night from the depeche mode concert in łódź and decided to get a meal at a mcdonalds but each one that we visited that normally are open 24/7 said that they were closed. Been wondering why
As a new zealander i can say i saw this happened when went to get fuel on leap day only affected the self service pumps and not paying in store fortunatly though 😮
Don’t know the validity but some servos in NZ and AUS super bugged and only charged 0.01c per l. A lot of people took advantage of it
Nice and to the point information! Thank you! 😀
I had to write some date handling software myself. But I don't remember it being difficult. I wrote it in Java. Java has an excellent time library nowadays (joda-time). I tested different years, daylight saving times, different time zones etc. It worked flawlessly.
But I can imagine you have to implement some time stuff yourself when running on embedded hardware. But even then; there are perfect C/C++ libraries to handle time.
I don't know the details of what went wrong, so I won't judge. Mistakes are made everywhere.
In my country (NL) the politicians are talking about making daylight savings time permanent. I imagine what the implications of that will be 😂
Oh wow...i wasn't expecting to see that game here
How are leap year bugs even a thing? Unix time isn't affected by it at all and the only time you ever need to step out of unit time is when you display the time in an UI of some sorts.
Yea I have a feeling if I waited to get a bus pass issued on 29th that it would last me 4 years, and not 1 xD. The bus terminals always say that the pass expres on "date of issuance"+1 year. but I'm not certain what logic they used :D, so it's likely that it looks for the next 29th in existence, it might think the 29th feb of 2025 exists,or is issued to 365th day after, or who knows what unexpected behavior happens.
Kiwis can’t even screw in a lightbulb
You can't fit in a lightbulb how you meant to screw in one?
Never thought I'd see Lilith's Throne mentioned anywhere outside of like... 18+ forums.
Interesting how you brought up Amazfit watches. My Bip, quite an old model, had no issues.
Let's just say if I ever get a fatal error from a leap year when programming any application; I will write a sequel to the Industrial Society and it's Future 2.0, Temporal Boogaloo!
Now you know why the Imperium exists; it wasn't Chaos or the Robots, but the fucking TIMES CONVERSION. 😆
Sweden experienced the same issue in a nation wide convient store called Ica.
Issue is that majority of swedes doesn’t carry cash…
NZ actually had lead the world on digital payments, like when I use to live there over 20 years cash was rare. That outage would have been a major pain for the outlets
This is why we need memory safe languages!!
😂
thank you for your videos on online security, neil degrasse tyson
I have a bunch of bots around the world that rely on time, I do use a time library to handle it for me but for simplicity I force them to use UTC time as in my case it's easier to handle.
It's useful using UTC time in logs :)
It happened for an application at my work, different engineering team. Pretty much everyone else laughed at them
Pls talk about the recent UHC hack and blink health! I’m a pharmacy tech and I’d love a deeper dive on this current issue
This is why I use date and time libraries and only store date and time related things in unix time
I LOVE LUCKY STAR AND YOUR VIDEOS
Self-proclaimed "smart watches" when 29th of February hits:
We've come full circle
was gonna install the open source RPG game lilith's throne but then realized what type of game it was
we had 4 devs staying up overnight ready to push an update if anything happened
we design HMI devices for industrial automation and we do test for leap year bugs as we have complete control over internal RTCs and can fake an external time API call, however you never know
i suspect the problem only happened in NZ because devs caught on and pushed an emergency update as they had over an hour to figure it out and at least do a quick band aid patch
You left out leap seconds in your description - those break stuff too! :D
My casio watch had the same bug!
leap year bug got to some train infrastructure too, it's hilarious
I actually submitted a bug report to ynab! Chuckled to myself when i noticed it lol
Nice video. Could you please speak about the new lasr version of tails 6.0
. Cuz it's look weird a littel bit !
There's also a great tom Scott video talking about this sort of topic. Just make sure you choose a library from somebody who actually knows how to deal with time.
So happy I came across your channel. Thanks for the content!
A client of mine had to call the AA to a self serve petrol station as she had no gas and the payment system didn't think that 29th Feb was a thing
hey kiwi here, i don't drive so i might be wrong but in my city chch, the personless pumps popped up recently, they turned all the normal petrol stations to be replaced with these ones and just boarded up the windows and door. possibly paid some new dev that overlooked it during covid. I think (?) they have existed before 2020 but who knows, i cant remember much before that year
The whole leap yeaer, skipped leap year not if the century is divisable by 4 thing cracks me up. It's such beautiful jank
also fuck 3:04
Reminds me of Y2K days.....they did a good job of that IMHO, a lot better than 2012... ;*[}
They probably wanted everything coded in house or was worried about security issues using outside libraries. Just a guess though I am not sure how realistic that risk is.
actually, those payment terminals are generally used here in NZ at self-service petrol stations without stores to pay by cash.
In Kazakhstan, government, in their infinite wisdom, decided to coincide leap day with transition to new time zone...
Result -- several banking and payment processors outage, people's birthday jumped a day on official governmental data, even digital government service stopped working briefly.
Borat was pleased
Swede here who only pays by *cash* . I still ate well on the 29th, as opposed to the normie cattle who fed on dirt that day
3:00 that spider was so random lmao
leap years just dabbing on developers is too fun
i will forever hate you for putting the spider clip into this and causing me to go into a panic fit. great video apart from that good sir
Its hilarious to see these kinds of failures when leap years is something that my university tortured me with mercilessly at every possible opportunity. This really is the most basic time/date fuckup you can make and every 4 years (Next exception is 2100) it rears its ugly head.
Lilith's throne😳
I work at a gas station in NZ , people were going nuts the other day lol
Especially if you have apps "that you need to hurry up and get it out now!" Kind of thing.
Technically NZ doesn’t just use credit cards for payments (lots of people avoid them). We have EFTPOS which uses bank cards instead.
I definitely want to have a bank account so I can buy stuff online but having cash and especially emergency cash is important and to ensure that the government or the police can't just seize it I love cash stock up on some cash.
I hear the echoes of Tom Scott's screams from eons past
ATF’s eforms page also went down
I'm working dates a lot (financial systems) in different time-frames and various other quirks like when a market is open and when it was closed either by plan or for some event. Doing it all yourself seems like a death wish or at least you have way too much time. I guess those terminals are written in something like C but I think even C has good libraries for it?
Weird that the galaxy watch had a similar issue like 2 months ago
Nice comennteing for alagy rhyme
Our company has some tests that must pass before our code can get merged into the main branch. We started getting errors in our date libraries on leap day because the test used the current date, but the library wasn’t expecting it. Our solution? We ran the tests again the day after.
Sir, out of everyone that watches your vids; I am probably the handful of people that know about that game's existence.
*HOW MUCH DO YOU KNOW ABOUT LILITH'S THRONE?*
when he mentioned Lilith's throne I was so flabbergasted lol
An open source rpg? Gotta check that out.
some of my llms tought it wad the 31 of february, however they have acces to the systemclock which was configured corrrect i wonder what more leap year bus there were and how they can ne leveraged