Handling Time in Software Development

Recording & Communicating Time in Software

Rachel Walker Articles, Programming 2 Comments

When I first started writing software to handle time, I went into it with a naive perspective that it couldn’t be that hard. After all, it’s just time, and I’ve understood how that worked since elementary school! It took my first daylight savings time transition to disabuse me of that notion. I began daydreaming that one day all systems would fully run on UTC and people would adapt to that as a standard.

No more writing code to handle time zones in different regions. No urgent time zone library updates to account for new government legislation around daylight savings time. Being able to add and subtract time without having to account for crossing time zones…

It sounded great to me at the time, and sometimes when I’m neck-deep in tricky code, I feel that way still. In calmer moments though, I’ve learned that’s not a philosophy that serves me. When I talk to people about my birthday, a holiday, or give vague time measurements like “twice a day” or “first thing tomorrow,” I’m not speaking to them about timestamps. I’m conveying an idea that just happens to involve time. Time isn’t just a number; it is communication that is tied to our days and nights and the lived human experience.

A good software product handles, records, and displays time accurately. A great piece of software captures, stores, and displays time and date information in a format that conveys the full idea to the intended recipients. Good software works; great software communicates.

Testing the Current Date/Time in Spring and Java

Keith Shakib Articles, Development Technologies & Tools, Java, Spring, Testing, Tutorial 1 Comment

Attention: The following article was published over 2 years ago, and the information provided may be aged or outdated. Please keep that in mind as you read the post.How often in Java services do we need to use the current date and time? Most of us would agree we use it quite often. Many times, we may want to record …

ThreeTen: The Ultimate Future of Java Date/Time…In Progress

David Kieras Articles, Development Technologies & Tools, Java 3 Comments

Attention: The following article was published over 14 years ago, and the information provided may be aged or outdated. Please keep that in mind as you read the post.My last article was entitled Joda-Time: The Future of Java Date/Time and I was pleased to see a lot of discussion on the topic. However, I may well have inappropriately named the …

Joda-Time: The Future of Java Date/Time

David Kieras Articles, Development Technologies & Tools, Java 15 Comments

Attention: The following article was published over 14 years ago, and the information provided may be aged or outdated. Please keep that in mind as you read the post.So how often have you had to work with date/time functions in Java? I mean really WORK with them? I’m not talking about simply setting the current time by instantiating a java.util.Date …