Entering and submitting a date to the "Automatically activate ad" or "Automatically expire ad" field in the "Scheduling" fieldset in the form of "Y-m-d H:i" (e.g. "2009-03-30 00:00") works as expected.

Next time when you edit the ad, this fields get populated with a date in the following format "F j, Y H:i". Normally this is "March 30, 2009 00:00", but when you have set an other language (e.g "German"), this will look like this "März 30, 2009 00:00".

The next submit of the form won't translate/resolve this German date with the "strtotime" function into a correct timestamp and results in setting dates to "0".

Two fix suggestions:

1. It is possible to use the php function "setlocale" to set the used language for strtotime, but I don't think that's as easy and may end up with other problems (when using multilang-environments, etc. )

2. Change custom date format from "F j, Y H:i" to "Y-m-d H:i" (or any other format without a textual representation)
In Version 5.x-1.7 this is on line 728 and 739 in the ad.module file.

Regards from Vienna
jack13

Comments

Jeremy’s picture

Priority: Minor » Normal
Status: Needs review » Active

Thanks for the bug report. Your suggested fix sounds good to me. (Note: it doesn't make sense to mark an issue as "patch needs review" unless you've actually attached a patch.)

jack13’s picture

Assigned: jack13 » Unassigned

@Jeremy
>Note: it doesn't make sense to mark an issue as "patch needs review" unless you've actually attached a patch.

ok, sorry (and I also changed the Assigned status from myself to Unassign)

Jeremy’s picture

Version: 5.x-1.7 » 6.x-2.x-dev

Re-assigning this to the 6.x-2.x branch, which is the only place new development is happening.

catofcheshir’s picture

subscribe

rafinskipg’s picture

c'mon!! This issue is important for the people of other countries.

Subscribing!

Molot’s picture

Subscribing

Module should either use given format of an numerical date, or allow admin to configure that format. Fixed for myself, but I hate patching.

green_eye55’s picture

How did you fix it? Could you tell us please? The bug still exists in 6.x-2.4.