Merge pull request #1083 from daniel-lucio/master

Use os.time instead of mysql native function
This commit is contained in:
FusionPBX 2015-08-10 10:22:22 -06:00
commit 9d83f9f153
1 changed files with 2 additions and 1 deletions

View File

@ -170,7 +170,8 @@
sql = sql .. "WHERE reg_user = '"..dialed_extension.."' ";
sql = sql .. "AND realm = '"..domain_name.."' ";
if (database["type"] == "mysql") then
sql = sql .. "AND expires > unix_timestamp(NOW())";
now = os.time();
sql = sql .. "AND expires > "..now;
else
sql = sql .. "AND to_timestamp(expires) > NOW()";
end