Re: syslog

From: Dan Nelson (dnelson_at_allantgroup.com)
Date: 01/03/04

  • Next message: Nate Lawson: "Re: Power Patches"
    Date: Sat, 3 Jan 2004 16:46:41 -0600
    To: Eugene Grosbein <eugen@grosbein.pp.ru>
    
    

    In the last episode (Jan 04), Eugene Grosbein said:
    > ache@freebsd.org wrote 8 years ago in src/lib/libc/gen/syslog.c:
    >
    > p += sprintf(p, "%.15s ", ctime(&now) + 4);
    >
    > What is '+ 4' for?

    ctime returns a date in the format:

    Thu Nov 24 18:22:48 1986\n\0

    The +4 skips the day name.

    -- 
    	Dan Nelson
    	dnelson@allantgroup.com
    _______________________________________________
    freebsd-hackers@freebsd.org mailing list
    http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
    To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org"
    

  • Next message: Nate Lawson: "Re: Power Patches"

    Relevant Pages

    • Re: Unix equivalent of SYS$BINTIM ?
      ... Does anyone know if there is an equivalent to this in UNIX? ... I have found routines that get time from unix binary format to text ... asctime, asctime_r, ctime, ctime_r, gmtime, gmtime_r, localtime, ...
      (comp.os.vms)
    • Re: malformed man pages [SOLVED]
      ... Dan Nelson wrote: ... Eg. man tar shows as follows: ... 1mtar 22m-- format of tape archive files ...
      (freebsd-questions)
    • Re: Converting from GMT
      ... CTime time); ... > call to get the current GMT offset? ... I use a COleDateTime object to format the ... > date/time for the user in their preferred format. ...
      (microsoft.public.vc.mfc)
    • Re: How to get a CTime from a string
      ... Here is a function I use for a very specific date format. ... parsing it manually, but it might give you some ideas. ... // Converts a char string US date to a CTime. ...
      (microsoft.public.vc.mfc)
    • Re: SCO file system mounting
      ... Dan Nelson wrote: ... >More likely that either a) the format isn't documented anywhere, ... Aftab Jahan Subedar ... To unsubscribe, ...
      (freebsd-questions)