mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2026-01-16 13:38:26 +00:00
Merge pull request #1083 from daniel-lucio/master
Use os.time instead of mysql native function
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user