The return value of ctime_s is of type errno_t not a string

Code:
    errno_t err = ctime_s(buf, sizeof(buf), &timer);

    if (err == 0)
        printf_s("Local time is: %s", buf);