Streamline the java StringToTime code

Streamlined the code to function more as a static utility class and be compatible with Joda DateTime.