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
Comment #1
Jeremy CreditAttribution: Jeremy commentedThanks 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.)
Comment #2
jack13 CreditAttribution: jack13 commented@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)
Comment #3
Jeremy CreditAttribution: Jeremy commentedRe-assigning this to the 6.x-2.x branch, which is the only place new development is happening.
Comment #4
catofcheshir CreditAttribution: catofcheshir commentedsubscribe
Comment #5
rafinskipg CreditAttribution: rafinskipg commentedc'mon!! This issue is important for the people of other countries.
Subscribing!
Comment #6
Molot CreditAttribution: Molot commentedSubscribing
Module should either use given format of an numerical date, or allow admin to configure that format. Fixed for myself, but I hate patching.
Comment #7
green_eye55 CreditAttribution: green_eye55 commentedHow did you fix it? Could you tell us please? The bug still exists in 6.x-2.4.