Revision: 2977
          https://sourceforge.net/p/mrbs/code/2977/
Author:   cimorrison
Date:     2015-01-22 09:50:33 +0000 (Thu, 22 Jan 2015)
Log Message:
-----------
Fixed bug in MRBS\DateTime::modify().   The seconds were not being set to zero 
as they should be if an hh:mm pattern is given as the modify string.

Modified Paths:
--------------
    mrbs/trunk/web/lib/MRBS/DateTime.php

Modified: mrbs/trunk/web/lib/MRBS/DateTime.php
===================================================================
--- mrbs/trunk/web/lib/MRBS/DateTime.php        2015-01-21 19:56:15 UTC (rev 
2976)
+++ mrbs/trunk/web/lib/MRBS/DateTime.php        2015-01-22 09:50:33 UTC (rev 
2977)
@@ -53,10 +53,13 @@
    $pattern = '/([01][0-9]|[2][0-3])[.:]?([0-5][0-9])/';
    if (preg_match($pattern, $modify, $matches))
    {
-     return array('hours'   => array('mode'     => 'absolute',
-                                     'quantity' => $matches[1]),
-                  'minutes' => array('mode'     => 'absolute',
-                                     'quantity' => $matches[2]));
+       // The seconds are assumed to be 0 in an hh:mm pattern
+       return array('hours'   => array('mode'     => 'absolute',
+                                       'quantity' => $matches[1]),
+                    'minutes' => array('mode'     => 'absolute',
+                                       'quantity' => $matches[2]),
+                    'seconds' => array('mode'     => 'absolute',
+                                       'quantity' => 0));
    }
    
    // Could add more tests later if need be.
------------------------------------------------------------------------------
New Year. New Location. New Benefits. New Data Center in Ashburn, VA.
GigeNET is offering a free month of service with a new server in Ashburn.
Choose from 2 high performing configs, both with 100TB of bandwidth.
Higher redundancy.Lower latency.Increased capacity.Completely compliant.
http://p.sf.net/sfu/gigenet
_______________________________________________
Mrbs-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mrbs-commits

Reply via email to