sipcapture / homer-api

HOMER 5: Back-End (API) DEPRICATED - use sipcapture/homer-app
http://sipcapture.org
27 stars 67 forks source link

PostgreSQL kamailio.cfg bug - FROM_UNIXTIME #109

Closed dpocock closed 8 years ago

dpocock commented 8 years ago

FROM_UNIXTIME is only available in MySQL

    $var(t_date) = "FROM_UNIXTIME(" + $var(t1) + ", '%Y-%m-%d %H:%i:00')";
    $var(f_date) = "FROM_UNIXTIME(" + $var(t2) + ", '%Y-%m-%d %H:%i:00')";

should be changed to something like this:

    $var(t_date) = "to_char(date(to_timestamp(" + $var(t1) + ")), '%Y-%m-%d %H:%i:00')";
    $var(f_date) = "to_char(date(to_timestamp(" + $var(t2) + ")), '%Y-%m-%d %H:%i:00')";
adubovikov commented 8 years ago

https://github.com/sipcapture/homer-api/commit/ff96a34f3ac3d111d6240000a3fad7a88e521d15