def value(self, currentPath=None):
    utcTime = 0
    strFrmt = self.defaultFormat
    if (currentPath is not None):
        (index, paths) = currentPath
        currentPath = '/'.join(paths[index:])
        match = PATHREGEX.match(currentPath)
        if (match is not None):
            type = match.group(1)
            if (type == 'local'):
                utcTime = 0
            else:
                utcTime = 1
            strFrmt = match.group(2)
            if (strFrmt == ''):
                strFrmt = self.defaultFormat
    if (self.ourValue is None):
        timeValue = time.localtime()
    else:
        timeValue = self.ourValue
    if utcTime:
        timeValue = time.gmtime(time.mktime(timeValue))
    value = timeformat.format(strFrmt, timeValue, utctime=utcTime)
    raise simpleTALES.ContextVariable(value)
def value(self, currentPath=None):
    utcTime = 0
    strFrmt = self.defaultFormat
    if (currentPath is not None):
        (index, paths) = currentPath
        currentPath = '/'.join(paths[index:])
        match = PATHREGEX.match(currentPath)
        if (match is not None):
            type = match.group(1)
            if (type == 'local'):
                utcTime = 0
            else:
                utcTime = 1
            strFrmt = match.group(2)
            if (strFrmt == ):
                strFrmt = self.defaultFormat
    if (self.ourValue is None):
        timeValue = time.localtime()
    else:
        timeValue = self.ourValue
    if utcTime:
        timeValue = time.gmtime(time.mktime(timeValue))
    value = timeformat.format(strFrmt, timeValue, utctime=utcTime)
    raise simpleTALES.ContextVariable(value)