Using TimeProvider and FakeTimeProvider in WinForms Testing .NET code involving time has always been a pain, but the TimeProvider class (backported to the .NET Framework) gives us awesome new tools.
How to use TimeProvider and FakeTimeProvider (time abstraction in .NET) Testing time in C# is difficult, but .NET 8 (C# 12) adds an abstract TimeProvider class that makes it easier. Let's take a closer look.
TWIL vol.6 (GitHub, 2FA... and lunar standard time?) This week I learned that GitHub wasn't requiring 2FA yet (but will soon), and the moon may need its own timezones (to the dismay of devs everywhere).
How do I add seconds, minutes, or hours to a DateTime structure in Erlang? Ruby gives you 12 ways to do anything. Erlang makes it tough to find one. Awhile back, I was trying to add time to an existing DateTime value, but I couldn't find a function (such as in the Calendar module) that allowed me to manipulate a DateTime value directly. Here's how I ended up doing it.
A few thoughts on date/time handling in Erlang Handling date and times is a thorn in every experienced developer's side. If you haven't had the pleasure yet, you will. ;) Coming off a week of standardizing some datetimes across an Erlang app, here's a few personal thoughts.
A few tips for handling and manipulating timezones Some issues transcend programming language, equally tripping up developers across the board... * Regular expressions (try validating an email address... [https://stackoverflow.com/q/201323/301857]) * SQL injection [https://www.owasp.org/index.php/SQL_Injection] (NEVER run a user's input through your database without sanitizing it) * Using floating