Unfortunately, Drupal doesn't offer a German time format on the admin/settings page. The attached patch adds the missing formats. This is a quick fix for 4.7/CVS HEAD, not a final solution (which won't get into 4.7; I know that).

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

kkaefer’s picture

FileSize
1.39 KB

Forgot to attach the patch ;-)

killes@www.drop.org’s picture

The absence of my preferred date format has annoyed me since Drupal 3.0 so I am likely to commit this. However, I don't like leading zeros, can we change d to j and H to G?

kkaefer’s picture

FileSize
1.39 KB

Made the proposed changes. Leading zeros don't bother me very much, but I'm not against them.

Steven’s picture

Status: Reviewed & tested by the community » Needs work

We can't add every date format under the sun. I'd much rather prefer a more flexible option, where new date formats can be imported/added through localization, and locale-specific date formats are offered (and not just running the date format through t() because that is not a proper solution).

kkaefer’s picture

Status: Needs work » Reviewed & tested by the community

Steven, I know that. And as I said in my first post, this is only a temporary solution for 4.7 because this will have much greater chance to get in than a new patch that adds a feature. Being able to configure the date/time freely is due for the next major Drupal version, but not for 4.7.

Tobias Maier’s picture

+1 for this it is realy annoying..

killes@www.drop.org’s picture

Steven, with your reasoning I ought to remove everything beyond yyyy-mm-dd hh:mm:ss +tz.

This particular time format is the only one which gets requested with some frequency. Your solution would maybe be better, but it isn't here yet.

killes@www.drop.org’s picture

FileSize
1.32 KB

As an alternative, here's a small module that replaces the standard selection with form fields which allow freeform definition of date formats.

sime’s picture

Many thanks killes. I installed your date.module and it works great for me as an alternative.

kkaefer’s picture

Aah, right! Praise the power of the new forms api! I'd change the description though to give a hint on PHP's date format page: http://php.net/date

drumm’s picture

-1 for a module. Lets actually fix this for 4.8.

drumm’s picture

Status: Reviewed & tested by the community » Fixed

Comitted to HEAD.

rstamm’s picture

Status: Fixed » Reviewed & tested by the community
FileSize
831 bytes

month of short format should be without leading zeros too.

2.04.2006 is not a german date format.

tenrapid’s picture

FileSize
831 bytes

I think the short format should have leading zeros for day, month, hour and minutes. It is mostly used in tabular listings and there it is better to read if all dates have the same width.

drumm’s picture

Status: Reviewed & tested by the community » Fixed

I reverted the changed date short format.

rstamm’s picture

Status: Fixed » Reviewed & tested by the community
FileSize
817 bytes

Sorry, but a short format is twice now.

Steven’s picture

Status: Reviewed & tested by the community » Fixed

Committed to HEAD.

killes@www.drop.org’s picture

I added the short Germand date format with leading zeros.

Anonymous’s picture

Status: Fixed » Closed (fixed)