MCPcopy
hub / github.com/cherrypy/cherrypy / time

Method time

cherrypy/_cplogging.py:288–295  ·  view source on GitHub ↗

Return now() in Apache Common Log Format (no timezone).

(self)

Source from the content-addressed store, hash-verified

286 self(traceback=True)
287
288 def time(self):
289 """Return now() in Apache Common Log Format (no timezone)."""
290 now = datetime.datetime.now()
291 monthnames = ['jan', 'feb', 'mar', 'apr', 'may', 'jun',
292 'jul', 'aug', 'sep', 'oct', 'nov', 'dec']
293 month = monthnames[now.month - 1].capitalize()
294 return ('[%02d/%s/%04d:%02d:%02d:%02d]' %
295 (now.day, month, now.year, now.hour, now.minute, now.second))
296
297 def _get_builtin_handler(self, log, key):
298 for h in log.handlers:

Callers 15

errorMethod · 0.95
accessMethod · 0.95
__init__Method · 0.80
compressFunction · 0.80
expire_cacheMethod · 0.80
synthesize_nonceFunction · 0.80
is_nonce_staleMethod · 0.80
cpstats.pyFile · 0.80
proc_timeFunction · 0.80
record_startMethod · 0.80
record_stopMethod · 0.80

Calls 1

nowMethod · 0.45

Tested by 2

markLogMethod · 0.64
test_8_Ram_CleanupMethod · 0.64