- Timestamp:
- May 25, 2020 1:00:24 PM (5 years ago)
- Location:
- trunk/src/VBox/ValidationKit/testmanager
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/ValidationKit/testmanager/core/base.py
r84271 r84498 616 616 617 617 @staticmethod 618 def validateTs(sValue, aoNilValues = tuple([None, '']), fAllowNull = True ):618 def validateTs(sValue, aoNilValues = tuple([None, '']), fAllowNull = True, fRelative = False): 619 619 """ Validates a timestamp field. """ 620 620 if sValue in aoNilValues: … … 653 653 iHour = int(oRes.group(4)); 654 654 iSec = int(oRes.group(5)); 655 if iMonth > 12 or iMonth <= 0:655 if iMonth > 12 or (iMonth <= 0 and not fRelative): 656 656 sError = 'Invalid timestamp month.'; 657 657 elif iDay > acDaysOfMonth[iMonth - 1]: -
trunk/src/VBox/ValidationKit/testmanager/webui/wuibase.py
r83430 r84498 634 634 # 635 635 chSign = sValue[0]; 636 (sValue, sError) = ModelDataBase.validateTs(sValue[1:] );636 (sValue, sError) = ModelDataBase.validateTs(sValue[1:], fRelative = True); 637 637 if sError is not None: 638 638 raise WuiException('%s parameter "%s" ("%s") is invalid: %s' % (self._sAction, sName, sValue, sError));
Note:
See TracChangeset
for help on using the changeset viewer.