The following code produces different output in Android and standard jdk
final DateFormat df = new SimpleDateFormat("EEE, dd MMM yyyy HH:mm:ss Z",
Locale.GERMAN);
final String today = df.format(new Date());
Output:
Android: Mi., 24 Jul 2013 12:33:12 +0200
Standard jdk: Mi, 24 Jul 2013 12:33:12 +0200
In the server side, It is throwing parse exception, any idea?
Use standard UTC date time format. Not all locales are supported by JDK. So it is safe to use Locale.US specially useful when exchanging data over platform.
この記事はインターネットから収集されたものであり、転載の際にはソースを示してください。
侵害の場合は、連絡してください[email protected]
コメントを追加