OK, my mistake capitalizing the pattern. SimpleDateFormat works
properly if I give the pattern correctly.
On Apr 3, 8:20 pm, Bill <[EMAIL PROTECTED]> wrote:
> Hello all. On the latest M5 I've tried creating a DateFormat object as
> follows:
>
> DateFormat df = newSimpleDateFormat("YYYY-MM-DD HH:MM:SS");
> df.setTimeZone( TimeZone.getTimeZone( "UTC" ) );
>
> TheSimpleDateFormatreference fails every time; the TimeZone
> reference does not cause a problem. I have very similar code that
> worked fine on the initial versions of the SDK. Just for grins, I
> changed "UTC" to "GMT" with the same result. The idea is to have a
> simple class that encapsulates a DateFormat object that will convert
> an ANSI/ISO date as understood by SQLite to/from a Date/String in the
> UTC timezone. So for a class ConvertDate:
>
> public Date parse(String dateTime);
>
> and
>
> public String format(Date date);
>
> The logcat snippet from the emulator for the failure on
> theSimpleDateFormatreference follows. Thanks for any help.
>
> ...
> D/dalvikvm( 656): Exception Ljava/lang/ClassNotFoundException; from
> PathClassLoader.java:205 not caught locally
> D/dalvikvm( 656): NOTE: loadClass
> 'org.apache.harmony.luni.internal.locale.ISO4Currencies_en_US'
> 0x40018950 threw an exception
> D/dalvikvm( 656): Exception Ljava/lang/ClassNotFoundException; from
> PathClassLoader.java:205 not caught locally
> D/dalvikvm( 656): NOTE: loadClass
> 'org.apache.harmony.luni.internal.locale.ISO4Currencies_en' 0x40018950
> threw an exception
> D/dalvikvm( 656): Exception Ljava/lang/ClassNotFoundException; from
> PathClassLoader.java:205 not caught locally
> D/dalvikvm( 656): NOTE: loadClass
> 'org.apache.harmony.luni.internal.locale.ISO4CurrenciesToDigits_en_US'
> 0x40018950 threw an exception
> D/dalvikvm( 656): Exception Ljava/lang/ClassNotFoundException; from
> PathClassLoader.java:205 not caught locally
> D/dalvikvm( 656): NOTE: loadClass
> 'org.apache.harmony.luni.internal.locale.ISO4CurrenciesToDigits_en'
> 0x40018950 threw an exception
> D/dalvikvm( 656): Exception Ljava/lang/ClassNotFoundException; from
> PathClassLoader.java:205 not caught locally
> D/dalvikvm( 656): NOTE: loadClass
> 'org.apache.harmony.text.internal.nls.messages_en_US' 0x40018950 threw
> an exception
> D/dalvikvm( 656): Exception Ljava/lang/ClassNotFoundException; from
> PathClassLoader.java:205 not caught locally
> D/dalvikvm( 656): NOTE: loadClass
> 'org.apache.harmony.text.internal.nls.messages_en' 0x40018950 threw an
> exception
> D/dalvikvm( 656): Exception Ljava/lang/ClassNotFoundException; from
> PathClassLoader.java:205 not caught locally
> D/dalvikvm( 656): NOTE: loadClass
> 'org.apache.harmony.text.internal.nls.messages' 0x40018950 threw an
> exception
> ...
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---