Bug #184729 Fixed

Posted: March 24th, 2003 | Author: Carter Rabasa | Filed under: Uncategorized | Comments

I sent my friend Sarah a perma-link to a post I wrote about the war. It was easier than explaining how I felt over IM. Much to my dismay, she told me she got an error page when she clicked on the link. After some investigation, I discovered I was improperly formatting the date.



This:



private final SimpleDateFormat datetime =
new SimpleDateFormat("M/d/yyyy hh:mm");




… became this:



private final SimpleDateFormat datetime =
new SimpleDateFormat("M/d/yyyy HH:mm");




Notice the uppercase H’s in the bottom. Lower case mean the hour is treated as 0-12. Uppercase means the hour is treated as 0-23. God, I hate those type of bugs.


blog comments powered by Disqus