I have a fix query as below, some strange behaviors which I try to understand it is whenever I run this query in different moments I got different results:( 134 , 143, 147, 152, 158)
This is how define in created table:
`user_registration_timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
Your query will return different counts as long as new users get registered. You can find out the details if you replace
My guess is that you haven't really verified that because you're assuming that
2016-10-03 15:33:26 is date in the past thus there's no possibility of having new users. The fact is that it's a local time and as of now (
2016-10-03 14:30 UTC) it's a past date in the Eastern time zones and still to come everywhere else.
If MySQL Server is not configured to use your local time zone but your code assumes so then it can be confusing.