Zum Inhalt springen
View in the app

A better way to browse. Learn more.

Fachinformatiker.de

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Empfohlene Antworten

Veröffentlicht

Hallo zusammen.

Ich sitzte gerade an einem eigentlich simplen Problem, aber das treibt mich gerade zur Verzweifelung.

Gegeben sei folgender Date String aus einem HTTP-Response Header:

Thu, 28 Nov 2013 14:02:29 GMZ
darauf wende ich eine Pattern an mit:

DateFormat df = new SimpleDateFormat("EEE, d MMM yyyy HH:mm:ss zzz", Locale.US);

Locale.US da Thu nunmal nicht deutsch ist ;) Aber parse ich nun den String über
df.parse("Thu 28 Nov 2013 14:02:29 GMZ");
wirft mir Eclipse eine:
java.text.ParseException: Unparseable date: "Thu, 28 Nov 2013 14:02:29 GMZ"
Exception ... Parse ich jedoch einen String wie z.B.
Sun Mar 06 11:28:16 IST 2011
mit der Pattern
EEE MMM d HH:mm:ss zzz yyyy

gibt er das Date wunderbar aus.

Löschen des , im ersten String bringt es nicht, genauso wie dd oder H:m:s oder z... Ich bin gerade echt mit meinem Latein am Ende. Sieht jemand den Fehler?

Vielen Dank

mfg Chris

Erstelle ein Konto oder melde dich an, um einen Kommentar zu schreiben.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.