brianfenton.us - Home — The Wuss of Steel — Code As Cruft

Example domain paragraphs

It turns out, PHP has 3 different ways to represent a DateTimeZone object, represented by $timezone_type in the var dump above. You can create one with a UTC offset (type 1, ex. -0500 ), a timezone abbreviation (type 2, ex. CDT ), or a timezone name (type 3, ex. America/Chicago ). All 3 are valid, and all represent the same moment in time, but only one of them contains enough context for PHP to understand DST . So while I knew it was CDT when I created the time string, when the code under test received it,

I ended up filling in the gaps using the context of the user, but when I initially tested it at the unit level, that wasn't there. Hence, the problem.

So far the Twitter hiatus is going surprisingly well. I've read two books and am starting on a different one that was recommended to me before finishing out the trilogy ( The Black Magician , for those curious). I've made multiple contributions to open source, completed a few arduous and nagging pieces of adulting, did some devops-ish things to some side projects ( HSTS and LetsEncrypt for everything!) and I've even had to start sending browser tabs from my desktop my phone (thanks Pushbullet !). Surprising

Links to brianfenton.us (1)