Scheduling date entries will be lost on next save (concerns only non english language)

Created on 19 February 2009, almost 16 years ago
Updated 19 September 2024, 3 months ago

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

๐Ÿ› Bug report
Status

Closed: outdated

Version

2.0

Component

ad module

Created by

๐Ÿ‡ฆ๐Ÿ‡นAustria jack13

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • ๐Ÿ‡ฉ๐Ÿ‡ชGermany lrwebks Porta Westfalica

    Drupal 6 is EOL and no longer supported. Closing this as outdated for that reason. Thanks for your contribution!

Production build 0.71.5 2024