• The plugin is using wp_date in some points to format the date of MySQL insert
    This will cause conflict with date plugins that format the date not with Gregorian format
    This lines should be replaced with the php date function in order to solve the problem as MySQL always needs certain format of Gregorian date.

    class-contact.php:132
    class-inbound-message.php:279

    Thanks

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author Takayuki Miyoshi

    (@takayukister)

    This will cause conflict with date plugins that format the date not with Gregorian format

    What plugins are they?

    This lines should be replaced with the php date function in order to solve the problem as MySQL always needs certain format of Gregorian date.

    Why do you think so? wp_date() outputs a Gregorian calendar date string in the specified format.

    Thread Starter AMIB

    (@amib)

    wp_date() outputs a Gregorian calendar date string in the specified format

    This is not true as there are some plugins that change the date system like: parsidate and some other ones…

    Plugin Author Takayuki Miyoshi

    (@takayukister)

    What is the parsidate?

    Thread Starter AMIB

    (@amib)

    Here is the link

    The better question would be:
    Why should the plugin use the filtered wp_date function to generate a parameter that supports just ONE format and value?

    Plugin Author Takayuki Miyoshi

    (@takayukister)

    So, you are saying that the Flamingo plugin should not use wp_date() because you use another plugin that overrides the output of wp_date() in an incorrect way?

    Thread Starter AMIB

    (@amib)

    Modification of date as local date system is not incorrect. Many many sites are using this method just to display dates, not to insert into MySQL with certain format.

    There are some correct usages of the wp_date function in the flamingo. but these two locations are incorrect.

    Plugin Author Takayuki Miyoshi

    (@takayukister)

    I can partially agree on the point that wp_date() isn’t the best function when no l10n is necessary, but I don’t think the Parsi Date plugin filters wp_date() output in a correct way. You should clearly know that Y-m-d H:i:s is the MySQL DATETIME format and doesn’t need to be localized.

    Thread Starter AMIB

    (@amib)

    There is no better way for date localization plugins to do the job they are doing. And also there is no straightforward method for those plugins to check for real usage of function return value.

    So I think the only solution for this conflict is not to use wp_date as there is no localization or manipulation necessary.

    • This reply was modified 4 years, 5 months ago by AMIB.
Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Conflict while getting date’ is closed to new replies.