openbmc/build/tmp/deploy/sdk/witherspoon-2019-08-08/sysroots/armv6-openbmc-linux-gnueabi/usr/src/debug/util-linux/2.33.2-r0/util-linux-2.33.2/misc-utils/logger.c
static char const* rfc3164_current_time(void)
{
    static char time[32];
    struct timeval tv;
    struct tm* tm;
    static char const* const monthnames[] = {"Jan", "Feb", "Mar", "Apr",
                                             "May", "Jun", "Jul", "Aug",
                                             "Sep", "Oct", "Nov", "Dec"};

    logger_gettimeofday(&tv, NULL);
    tm = localtime(&tv.tv_sec);
    snprintf(time, sizeof(time), "%s %2d %2.2d:%2.2d:%2.2d",
             monthnames[tm->tm_mon], tm->tm_mday, tm->tm_hour, tm->tm_min,
             tm->tm_sec);
    return time;
}
/* this creates a timestamp based on current time according to the
 * fine rules of RFC3164, most importantly it ensures in a portable
 * way that the month day is correctly written (with a SP instead
 * of a leading 0). The function uses a static buffer which is
 * overwritten on the next call (just like ctime() does).
 */
this creates a timestamp based on current time according to the
fine rules of RFC3164, most importantly it ensures in a portable
way that the month day is correctly written (with a SP instead
of a leading 0). The function uses a static buffer which is
overwritten on the next call (just like ctime() does).
this creates a timestamp based on current time according to the fine rules of RFC3164 most importantly it ensures in a portable way that the month day is correctly written ( with a SP instead of a leading 0 ) . The function uses a static buffer which is overwritten on the next call ( just like ctime () does ) .
static char const* rfc3164_current_time(void)
{
    static char time[32];
    struct timeval tv;
    struct tm* tm;
    static char const* const monthnames[] = {"Jan", "Feb", "Mar", "Apr",
                                             "May", "Jun", "Jul", "Aug",
                                             "Sep", "Oct", "Nov", "Dec"};
    logger_gettimeofday(&tv, NULL);
    tm = localtime(&tv.tv_sec);
    snprintf(time, sizeof(time), "%s %2d %2.2d:%2.2d:%2.2d",
             monthnames[tm->tm_mon], tm->tm_mday, tm->tm_hour, tm->tm_min,
             tm->tm_sec);
    return time;
}
static char const * rfc3164_current_time ( void ) { static char time [ 32 ] ; struct timeval tv ; struct tm * tm ; static char const * const monthnames [ ] = { " " , " " , " " , " " , " " , " " , " " , " " , " " , " " , " " , " " } ; logger_gettimeofday ( & tv , NULL ) ; tm = localtime ( & tv . tv_sec ) ; snprintf ( time , sizeof ( time ) , " " , monthnames [ tm -> tm_mon ] , tm -> tm_mday , tm -> tm_hour , tm -> tm_min , tm -> tm_sec ) ; return time ; }
this creates a timestamp based on current time according to the
 fine rules of RFC3164, most importantly it ensures in a portable
 way that the month day is correctly written (with a SP instead
 of a leading 0).
this creates a timestamp based on current time according to the fine rules of RFC3164 most importantly it ensures in a portable way that the month day is correctly written ( with a SP instead of a leading 0 ) .