Rails' end_of_month

Posted by andy

Whilst building the payment module for one of my Rails apps I used the very convenient Rails’ Time extension method end_of_month returns the last day of the month. However it sets the time to 00:00:00, which is quite unexpected IMHO! Technically the end of the month is still 86400 seconds away. This behaviour is documented, but if you haven’t actually read the whole API it might cause some nasty surprises. I fixed it by simply adding 86399 seconds to end_of_time. That still leaves 999 usecs, but I can live with that :)

Dapper Drake!

Posted by andy

Hello Dapper Drake! Been running “Dapper” for a couple of days now. So far so good. Nothing major has broken (yet) and all Breezy configs copied over without problems. I did start from a fresh Dapper Flight 3 CD ISO since in my experience that’s the path of least resistance when doing a stable to unstable switch in Ubuntu. I would definitely not recommend Dapper just yet, unless you have some special craving for the new goodies. New cool stuff so far include lighttpd , PostgreSQL 8.1 and XGL (w00t!!). Downside is that suspend/hibernate is still horribly broken for my Dell laptop and console switching is througly hosed (famous black screen problem). But I’m sticking with it.