Listing 6. Implementation of CURRENT_TIME()

void current_time( sqlite_func context*,
                   int argc, const char **argv)
{
    assert(argc==0);

    sqlite_set_result_string(context,
                             ctime(time(NULL)), -1);
}