]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Commit Nick Gorham's suggestion for timestamp fix
authorTilghman Lesher <tilghman@meg.abyt.es>
Fri, 11 Jan 2008 18:30:00 +0000 (18:30 +0000)
committerTilghman Lesher <tilghman@meg.abyt.es>
Fri, 11 Jan 2008 18:30:00 +0000 (18:30 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@98268 65c4cc65-6c06-0410-ace0-fbb531ad65f3

cdr/cdr_odbc.c

index 4f7b5cdbd50199699cfd7f40d5d224510db3c585..af02d393ce2b8634415d738340b2fe3576350afe 100644 (file)
@@ -74,12 +74,12 @@ static SQLHSTMT prepare_cb(struct odbc_obj *obj, void *data)
                snprintf(sqlcmd,sizeof(sqlcmd),"INSERT INTO %s "
                "(calldate,clid,src,dst,dcontext,channel,dstchannel,lastapp,"
                "lastdata,duration,billsec,disposition,amaflags,accountcode,uniqueid,userfield) "
-               "VALUES ('%s',?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)", table, timestr);
+               "VALUES ({ts '%s'},?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)", table, timestr);
        } else {
                snprintf(sqlcmd,sizeof(sqlcmd),"INSERT INTO %s "
                "(calldate,clid,src,dst,dcontext,channel,dstchannel,lastapp,lastdata,"
                "duration,billsec,disposition,amaflags,accountcode) "
-               "VALUES ('%s',?,?,?,?,?,?,?,?,?,?,?,?,?)", table, timestr);
+               "VALUES ({ts '%s'},?,?,?,?,?,?,?,?,?,?,?,?,?)", table, timestr);
        }
 
        ODBC_res = SQLAllocHandle(SQL_HANDLE_STMT, obj->con, &stmt);