httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ralf S. Engelschall" <...@engelschall.com>
Subject Re: cvs commit: apache-1.3/src/support log_server_status
Date Fri, 04 Jun 1999 07:18:20 GMT

In article <19990603173825.25640.qmail@hyperreal.org> you wrote:
> coar        99/06/03 10:38:25
> 
>   Modified:    src/support log_server_status
>   Log:
>       Change to use four digits for the year.
> [...]
>   -   $date=`date +%y%m%d:%H%M%S`;
>   +   $date=`date +%Y%m%d:%H%M%S`;
> [...]

Be careful, Ken: %Y is not portable.
For instance an excerpt from my shtool package:

    time_year="`date '+%Y' 2>/dev/null | awk '{ printf("%s", $1); }'`"
    if test ".$time_year" = .; then
        time_year="`date '+%y' | awk '{ printf("%s", $1); }'`"
        case $time_year in
            [5-9][0-9]) time_year="19$time_year" ;;
            [0-4][0-9]) time_year="20$time_year" ;;
        esac
    fi
                                       Ralf S. Engelschall
                                       rse@engelschall.com
                                       www.engelschall.com

Mime
View raw message