BF: be able to detect time for VNC recording only 2 letters of year (closes: #537610)

pull/8/head
Yaroslav Halchenko 2009-09-10 11:15:38 -04:00
parent 927a01a076
commit fd4c151353
1 changed files with 7 additions and 0 deletions

View File

@ -74,6 +74,13 @@ class DateDetector:
template.setRegex("\d{2}/\d{2}/\d{4} \d{2}:\d{2}:\d{2}")
template.setPattern("%d/%m/%Y %H:%M:%S")
self.__templates.append(template)
# previous one but with year given by 2 digits
# (See http://bugs.debian.org/537610)
template = DateStrptime()
template.setName("Day/Month/Year Hour:Minute:Second")
template.setRegex("\d{2}/\d{2}/\d{2} \d{2}:\d{2}:\d{2}")
template.setPattern("%d/%m/%y %H:%M:%S")
self.__templates.append(template)
# Apache format [31/Oct/2006:09:22:55 -0000]
template = DateStrptime()
template.setName("Day/MONTH/Year:Hour:Minute:Second")