MyBB Community Forums

Full Version: patch modcp time and date format according to settings
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
--- modcp.php   2008-11-27 10:45:25.000000000 +0300
+++ modcp2.php  2009-02-12 14:07:05.000000000 +0300
@@ -971,8 +971,8 @@
        else
        {
                // Note: dates are in user's timezone
-               $starttime_time = my_date('g:i a', $announcement['startdate']);
-               $endtime_time = my_date('g:i a', $announcement['enddate']);
+               $starttime_time = my_date($mybb->settings['timeformat'], $announcement['startdate'], 0);
+               $endtime_time = my_date($mybb->settings['timeformat'], $announcement['enddate'], 0);
                                                                                                                                                            
                $startday = my_date('j', $announcement['startdate']);
                $endday = my_date('j', $announcement['enddate']);
Can you provide me with a reason for these changes?
I think he/she wants the announcements to end according to everyone's time settings or something?
It fixing incorrect format of date and time when editing Announces in modcp