Make WordPress Core

Opened 6 years ago

Closed 6 years ago

#11927 closed defect (bug) (invalid)

mysql2date translate parameter doesn't work

Reported by: mattifesto Owned by:
Milestone: Priority: normal
Severity: normal Version: 2.9.1
Component: General Keywords:
Focuses: Cc:


The translate parameter of mysql2date function has no effect on the output making it difficult to store dates in mysql as gmt and then translate them back to the blog's set time zone.

I'm including a test plugin file that when enabled will insert the following lines at the beginning of the_content showing that the translate parameter has no effect. If the translate parameter is working, the 2 second lines should show different times.

Current MySQL GMT date/time: 2010-01-17 00:24:36

mysql2date translate=false: 00:24:36

mysql2date translate=true: 00:24:36

I tested this on 2.9.1 and 2.7.1, on my local machine and on a 3rd party hosted internet site.

Attachments (1)

TimeTranslationBug.php (834 bytes) - added by mattifesto 6 years ago.
Test Case Plugin (will insert test text before content while activated)

Download all attachments as: .zip

Change History (2)

6 years ago

Test Case Plugin (will insert test text before content while activated)

#1 @nacin
6 years ago

  • Milestone Unassigned deleted
  • Resolution set to invalid
  • Status changed from new to closed

$translate is for i18n, not for time zones.

Note: See TracTickets for help on using tickets.