Inconsistent date time format for German locale

Shamim Ahmmed

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?

user2643395

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]

編集
0

コメントを追加

0

関連記事

分類Dev

Convert miliseconds to date and time and format by locale

分類Dev

NSDateFormatter time format depending on Locale

分類Dev

How to display date format according to locale?

分類Dev

Using momentjs to format a date in a specific locale

分類Dev

What is this date and time format?

分類Dev

Parse Date and Time in specific format

分類Dev

Convert GMT date format to only time format

分類Dev

pandas date-time format VS google sheets date format

分類Dev

How to change Date/Time format to English?

分類Dev

How to get current date time format in SQlite?

分類Dev

Karati Api - Validating date and time format

分類Dev

R : how to define date and time format

分類Dev

format a time series as dataframe with julian date

分類Dev

How to change date-time format?

分類Dev

convert text string to date/time format

分類Dev

PHP - Convert this string to another date/time format

分類Dev

Formatter in DateTimeFormatter for ISO 8601 date format of the time

分類Dev

How can I format date_space_hour to a time format

分類Dev

Date time conversion in Javascript from format "/Date(1535515200000)/"

分類Dev

Can NSDateFormatter format a date relative to a time other than the current time?

分類Dev

how to convert python time.time() to date format for sql insertion

分類Dev

How to format the given time string and convert to date/time object

分類Dev

Date conversion to a different locale

分類Dev

Spring @RequestParam DateTime format as ISO 8601 Date Optional Time

分類Dev

Spring @RequestParam DateTime format as ISO 8601 Date Optional Time

分類Dev

How to format the value of input[time] when bound to Date()-object

分類Dev

VALUE error when attempting to format a date and time cell

分類Dev

How do I get the current date and time in the format given Below

分類Dev

How to change the date/time format to English from the command line?

Related 関連記事

  1. 1

    Convert miliseconds to date and time and format by locale

  2. 2

    NSDateFormatter time format depending on Locale

  3. 3

    How to display date format according to locale?

  4. 4

    Using momentjs to format a date in a specific locale

  5. 5

    What is this date and time format?

  6. 6

    Parse Date and Time in specific format

  7. 7

    Convert GMT date format to only time format

  8. 8

    pandas date-time format VS google sheets date format

  9. 9

    How to change Date/Time format to English?

  10. 10

    How to get current date time format in SQlite?

  11. 11

    Karati Api - Validating date and time format

  12. 12

    R : how to define date and time format

  13. 13

    format a time series as dataframe with julian date

  14. 14

    How to change date-time format?

  15. 15

    convert text string to date/time format

  16. 16

    PHP - Convert this string to another date/time format

  17. 17

    Formatter in DateTimeFormatter for ISO 8601 date format of the time

  18. 18

    How can I format date_space_hour to a time format

  19. 19

    Date time conversion in Javascript from format "/Date(1535515200000)/"

  20. 20

    Can NSDateFormatter format a date relative to a time other than the current time?

  21. 21

    how to convert python time.time() to date format for sql insertion

  22. 22

    How to format the given time string and convert to date/time object

  23. 23

    Date conversion to a different locale

  24. 24

    Spring @RequestParam DateTime format as ISO 8601 Date Optional Time

  25. 25

    Spring @RequestParam DateTime format as ISO 8601 Date Optional Time

  26. 26

    How to format the value of input[time] when bound to Date()-object

  27. 27

    VALUE error when attempting to format a date and time cell

  28. 28

    How do I get the current date and time in the format given Below

  29. 29

    How to change the date/time format to English from the command line?

ホットタグ

アーカイブ