This commit is contained in:
wangyidong
2015-05-31 14:36:43 +08:00
parent 1f32ddbce9
commit c4f4bc5381
2 changed files with 2 additions and 2 deletions

View File

@@ -207,7 +207,7 @@ class date
*/
public static function getLastMonth()
{
$begin = date('Y-m', strtotime('last month')) . '-01 00:00:00';
$begin = date('Y-m', strtotime('last month', strtotime(date('Y-m',time()) . '-01 00:00:01'))) . '-01 00:00:00';
$end = date('Y-m', strtotime('this month')) . '-00 23:59:59';
return array('begin' => $begin, 'end' => $end);
}

View File

@@ -69,7 +69,7 @@ class report extends control
$this->app->loadLang('bug');
if($begin == 0)
{
$begin = date('Y-m-d', strtotime('last month'));
$begin = date('Y-m-d', strtotime('last month', strtotime(date('Y-m',time()) . '-01 00:00:01')));
}
else
{