« Back to home

Attack of the Heisenbug

This week I battled a bug which was exceptionally sneaky at hiding itself. Consider the following Domino Java code accessing a single-valued date-only field: Document doc; […fetch document…] Vector v = doc.getItemValueDateTimeArray("SomeDateField"); DateTime dt = (DateTime) v.get(0); Date jdt = dt.toJavaDate(); System.out.println(dt.toString() + " = " + jdt.toString()); What happens when you run the code? Well, the getItemValueDateTimeArray() call fetches the contents of the Notes item (field) from the document, and returns it as a Vector of Notes DateTime objects.…

Read more »

Chronological pitfalls

Since the US just changed time zone, and the EU will be changing time zone soon, it seems like a good time to refresh an old posting of mine about dates and times, and how hard it can be to do the right things with them in software. I’ve spent a lot of my career in the computer industry working on computer-based calendar systems and organizers of various kinds. Here are a few pitfalls to be aware of.…

Read more »