Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Query.php whereTime的bug #22

Open
yhuaqiang opened this issue Mar 11, 2017 · 2 comments
Open

Query.php whereTime的bug #22

yhuaqiang opened this issue Mar 11, 2017 · 2 comments

Comments

@yhuaqiang
Copy link

whereTime('time','last month')
case 'last month':
$range = [date('y-m-01', strtotime('-1 month')), mktime(0, 0, 0, $date['mon'], 1, $date['year'])];
break;
range为上个月范围,但是返回的区间一个是字符串,一个是时间戳...
是不是左边也要mktime..

@liu21st
Copy link
Member

liu21st commented Mar 13, 2017

这个其实是没有影响的 最终解析的时候还是会根据字段类型来处理的 首先都会转换为时间戳

@yhuaqiang
Copy link
Author

但是最终在mongodb的查询语句中也是字符串,没有转换成时间戳....

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants