Download Install Tutorial Docs FAQ Tools WikiLicense Team IRC Planet Involvement Shop Book

Changeset 830

Show
Ignore:
Timestamp:
11/21/05 06:54:05
Author:
rdelon
Message:

Conform date format to common access log

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/cherrypy/_cputil.py

    r823 r830  
    11"""A few utility classes/functions used by CherryPy.""" 
    22 
     3import cgi 
     4import datetime 
    35import sys 
    46import traceback 
    5 import time 
    6 import cgi 
    77 
    88import cherrypy 
    99from cherrypy.lib import httptools 
    10  
    1110 
    1211def get_object_trail(objectpath=None): 
     
    9392 
    9493def logtime(): 
    95     return '%04d/%02d/%02d %02d:%02d:%02d' % time.localtime(time.time())[:6] 
     94    now = datetime.datetime.now() 
     95    month = httptools.monthname[now.month][:3].capitalize() 
     96    return '%02d/%s/%04d:%02d:%02d:%02d' % ( 
     97        now.day, month, now.year, now.hour, now.minute, now.second) 
    9698 
    9799def _cpLogAccess(): 

Hosted by WebFaction

Log in as guest/cpguest to create tickets