Title: Conflict while getting date
Last modified: September 15, 2020

---

# Conflict while getting date

 *  [AMIB](https://wordpress.org/support/users/amib/)
 * (@amib)
 * [5 years, 8 months ago](https://wordpress.org/support/topic/conflict-while-getting-date/)
 * 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](https://wordpress.org/support/users/takayukister/)
 * (@takayukister)
 * [5 years, 8 months ago](https://wordpress.org/support/topic/conflict-while-getting-date/#post-13408728)
 * > 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()`](https://developer.wordpress.org/reference/functions/wp_date/)
   outputs a Gregorian calendar date string in the specified format.
 *  Thread Starter [AMIB](https://wordpress.org/support/users/amib/)
 * (@amib)
 * [5 years, 8 months ago](https://wordpress.org/support/topic/conflict-while-getting-date/#post-13408819)
 * > `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](https://wordpress.org/support/users/takayukister/)
 * (@takayukister)
 * [5 years, 8 months ago](https://wordpress.org/support/topic/conflict-while-getting-date/#post-13411807)
 * What is the `parsidate`?
 *  Thread Starter [AMIB](https://wordpress.org/support/users/amib/)
 * (@amib)
 * [5 years, 8 months ago](https://wordpress.org/support/topic/conflict-while-getting-date/#post-13411891)
 * Here is the [link](https://wordpress.org/plugins/wp-parsidate/)
 * 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](https://wordpress.org/support/users/takayukister/)
 * (@takayukister)
 * [5 years, 8 months ago](https://wordpress.org/support/topic/conflict-while-getting-date/#post-13412664)
 * 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](https://wordpress.org/support/users/amib/)
 * (@amib)
 * [5 years, 8 months ago](https://wordpress.org/support/topic/conflict-while-getting-date/#post-13412869)
 * 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](https://wordpress.org/support/users/takayukister/)
 * (@takayukister)
 * [5 years, 8 months ago](https://wordpress.org/support/topic/conflict-while-getting-date/#post-13413674)
 * 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](https://wordpress.org/support/users/amib/)
 * (@amib)
 * [5 years, 8 months ago](https://wordpress.org/support/topic/conflict-while-getting-date/#post-13418723)
 * 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 5 years, 8 months ago by [AMIB](https://wordpress.org/support/users/amib/).

Viewing 8 replies - 1 through 8 (of 8 total)

The topic ‘Conflict while getting date’ is closed to new replies.

 * ![](https://ps.w.org/flamingo/assets/icon-128x128.png?rev=1540977)
 * [Flamingo](https://wordpress.org/plugins/flamingo/)
 * [Support Threads](https://wordpress.org/support/plugin/flamingo/)
 * [Active Topics](https://wordpress.org/support/plugin/flamingo/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/flamingo/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/flamingo/reviews/)

 * 8 replies
 * 2 participants
 * Last reply from: [AMIB](https://wordpress.org/support/users/amib/)
 * Last activity: [5 years, 8 months ago](https://wordpress.org/support/topic/conflict-while-getting-date/#post-13418723)
 * Status: not a support question