Time format is showing wrong in mail

If I go to my mailbox, the time of messages shows correctly: month/day/time. But when I go into the message, the time shows as day/month/time. I have all settings under variables to show as m/d/time.

 

Short Date Format(for code):m.d.Y

Long Date Format(for code):m.d.Y H:i

Short Date Format(for database):%m.%d.%Y

Long Date Format(for database):%m.%d.%Y %H:%i

PHP date format: F j, Y

 The time on the mailbox is using Long Date Format(for database), but the time in the message itself, I don't know where that's being pulled form. I changed the seperators from (.) to dashes. It's still showing the seperator as periods in the mail message itself, and doesn't seem to be pulling from ANY of those time settings under variables.

 

The template is using __date_create__ in mail_box_view_message.html The template mail_box.html uses __date__, so I tried to replace that in mail_box_view_message.html, and it shows as just that, __date__, rather than show the time and date.

So how can this be happening? Can anyone confirm the same with their Dolphin? I have 7.0.9

Quote · 1 Oct 2012

Hello

Looks like it's a bug in Dolphin. You may fix it by changing templates/base/scripts/BxBaseMailBox.php file. Open it in an editor, find the following code

            "
                SELECT 
                    *,
                    DATE_FORMAT(`Date`, '%d.%m.%Y H:%i') AS `Date`
                FROM 
                    `sys_messages` 
                WHERE 
                    `ID` = {$this -> aMailBoxSettings['messageID']} 
                AND
                    (
                        `Sender` = {$this -> aMailBoxSettings['member_id']}
                            OR
                        `Recipient` = {$this -> aMailBoxSettings['member_id']}
                    )
            ";

and replace it

DATE_FORMAT(`Date`, '%d.%m.%Y H:%i') AS `Date`

with

DATE_FORMAT(`Date`, '" . getLocaleFormat(BX_DOL_LOCALE_DATE, BX_DOL_LOCALE_DB) . "') AS `Date`

You may use BX_DOL_LOCALE_DATE_SHORT constant instead of BX_DOL_LOCALE_DATE one. In this case mailbox will use date format from global Settings.

Best Regards AntonLV - http://www.boonex.com/market/posts/AntonLV
Quote · 2 Oct 2012

I don't know what I'd without some of you guys, thanks Anton!

Quote · 2 Oct 2012

Hello

I don't know what I'd without some of you guys, thanks Anton!

You are welcome. :)

P.S. Thank you for reporting such specific bug. It's very hard to catch. :)

Best Regards AntonLV - http://www.boonex.com/market/posts/AntonLV
Quote · 2 Oct 2012
 
 
Below is the legacy version of the Boonex site, maintained for Dolphin.Pro 7.x support.
The new Dolphin solution is powered by UNA Community Management System.