'Returns the last modification time of a file or directory.
How time is returned is determined based on the given ``format``
string as follows. Note that all checks are case-insensitive.
Returned time is also automatically logged.
1) If ``format`` contains the word ``epoch``, the time is returned
in seconds after the UNIX epoch. The return value is always
an integer.
2) If ``format`` contains any of the words ``year``, ``month``,
``day``, ``hour``, ``min`` or ``sec``, only the selected parts are
returned. The order of the returned parts is always the one
in the previous sentence and the order of the words in
``format`` is not significant. The parts are returned as
zero-padded strings (e.g. May -> ``05``).
3) Otherwise, and by default, the time is returned as a
timestamp string in the format ``2006-02-24 15:08:31``.
Examples (when the modified time of ``${CURDIR}`` is
2006-03-29 15:06:21):
| ${time} = | Get Modified Time | ${CURDIR} |
| ${secs} = | Get Modified Time | ${CURDIR} | epoch |
| ${year} = | Get Modified Time | ${CURDIR} | return year |
| ${y} | ${d} = | Get Modified Time | ${CURDIR} | year,day |
| @{time} = | Get Modified Time | ${CURDIR} | year,month,day,hour,min,sec |
- ${time} = \'2006-03-29 15:06:21\'
- ${secs} = 1143637581
- ${year} = \'2006\'
- ${y} = \'2006\' & ${d} = \'29\'
- @{time} = [\'2006\', \'03\', \'29\', \'15\', \'06\', \'21\']'

def get_modified_time(self, path, format='timestamp'):

    path = self._absnorm(path)
    if (not os.path.exists(path)):
        self._error(("Path    '%s'    does    not    exist." % path))
    mtime = get_time(format, os.stat(path).st_mtime)
    self._link(("Last    modified    time    of    '%%s'    is    %s." % mtime), path)
    return mtime
