4 ms·
I have written code (at work) that crashes when the moon is in a specific phase. I had a "switch(moon_phase)" and forgot one of the cases... And the Android ap
by chaosite 5y ago
I have written code (at work) that crashes when the moon is in a specific phase.
I had a "switch(moon_phase)" and forgot one of the cases... And the Android app was in debug mode, so any uncaught exception brought the whole thing down.
- tupac_speedrap 5y agoHaving the code crash every full moon would be pretty cursed tbh.
- grishka 5y agoNot nearly as cursed as two parent comments, but there was a widespread problem in my very popular Android app. The relative date formatting function worked incorrectly for many users, it was off by one hour. It turns out that when Russia (where most of our users were) had abolished DST, and then changed timezones a couple of times, people got really confused. Since Android's timezone data is part of the system, it was basically set in stone. Most of the users didn't choose the timezone with the correct offset, but instead set their time an hour forward so the incorrect timezone and incorrect unixtime cancel each other out for a "correct" displayed time. I ended up getting the known correct unixtime from the server to try to guess which timezone offset the user actually meant and correcting the result of System.currentTimeMillis() and my formatting for that.