I'm trying to take a String and convert it to another String in a more readable format:
String startTime = invite.get_start_time();
Log.d(LOG_TAG, "String to be converted is " + startTime);
DateTimeFormatter fmt = DateTimeFormat.forPattern("yyyy-MM-dd HH:mm:ss");
DateTime dt = fmt.parseDateTime(startTime);
invite.set_start_time(dt.toString("MM dd yyyy hh:mmaa"));
08-02 14:33:19.011: D/InvitesObjectListAdapter(856): String to be converted is 2015-08-03 10:30:00 08-02 14:33:19.041: W/System.err(856): java.io.IOException: Resource not found: "org/joda/time/tz/data/ZoneInfoMap" ClassLoader: dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/me.lunchbunch.core-1/base.apk"],nativeLibraryDirectories=[/vendor/lib64, /system/lib64]]]
Anyone know where this error comes from?
Joda-Time is licensed under the business-friendly Apache 2.0 licence. The list of FAQ s. Why Joda Time? The standard date and time classes prior to Java SE 8 are poor. By tackling this problem head-on, Joda-Time became the de facto standard date and time library for Java prior to Java SE 8.
To use Joda-Time you need to download the latest version. The download will contain the joda-time jar file. Once you add this to your classpath you will be able to use Joda-Time. The binary download also includes joda-time-sources.jar, which is a jar file of the source code suitable for linking to the jar file in IDEs such as Eclipse.
The binary download also includes joda-time-sources.jar, which is a jar file of the source code suitable for linking to the jar file in IDEs such as Eclipse. The release notes for upgraders can be found here:
There is a compile-time dependency on Joda-Convert, but this is not required at runtime thanks to the magic of annotations. Available in Maven Central. The 2.x product line will be supported using standard Java mechanisms.
Sorry for wasting peoples' times, @adelphus is correct - I did not initialize with:
JodaTimeAndroid.init(this);
It was in my code, but I need to refactor to ensure this is hit.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With