I’ve got a bunch of dates in this String format:
String date = "Wed Sep 15 16:31:05 BST 2010";
and I’d like to convert it back to a date or calendar object. Before I go and reinvent the wheel, are there any easy ways of doing this, preferably present in the JDK?
Using
SimpleDateFormatAlternatively, as suggested by Jon Skeet, you can use JodaTime’s
DateTimeFormat– the pattern should be the same. But it appears that the BDT/BST/BDST timezone aliases are not supported properly by JodaTime.