'Sets the file modification and access times.
Changes the modification and access times of the given file to
the value determined by ``mtime``. The time can be given in
different formats described below. Note that all checks
involving strings are case-insensitive. Modified time can only
be set to regular files.
1) If ``mtime`` is a number, or a string that can be converted
to a number, it is interpreted as seconds since the UNIX
epoch (1970-01-01 00:00:00 UTC). This documentation was
originally written about 1177654467 seconds after the epoch.
2) If ``mtime`` is a timestamp, that time will be used. Valid
timestamp formats are ``YYYY-MM-DD hh:mm:ss`` and
``YYYYMMDD hhmmss``.
3) If ``mtime`` is equal to ``NOW``, the current local time is used.
This time is got using Python\'s ``time.time()`` function.
4) If ``mtime`` is equal to ``UTC``, the current time in
[http://en.wikipedia.org/wiki/Coordinated_Universal_Time|UTC]
is used. This time is got using ``time.time() + time.altzone``
in Python.
5) If ``mtime`` is in the format like ``NOW - 1 day`` or ``UTC + 1
hour 30 min``, the current local/UTC time plus/minus the time
specified with the time string is used. The time string format
is described in an appendix of Robot Framework User Guide.
Examples:
| Set Modified Time | /path/file | 1177654467         | # Time given as epoch seconds |
| Set Modified Time | /path/file | 2007-04-27 9:14:27 | # Time given as a timestamp   |
| Set Modified Time | /path/file | NOW                | # The local time of execution |
| Set Modified Time | /path/file | NOW - 1 day        | # 1 day subtracted from the local time |
| Set Modified Time | /path/file | UTC + 1h 2min 3s   | # 1h 2min 3s added to the UTC time |
Support for UTC time is a new feature in Robot Framework 2.7.5.'

def set_modified_time(self, path, mtime):

    mtime = parse_time(mtime)
    path = self._absnorm(path)
    if (not os.path.exists(path)):
        self._error(("File    '%s'    does    not    exist." % path))
    if (not os.path.isfile(path)):
        self._error(("Path    '%s'    is    not    a    regular    file." % path))
    os.utime(path, (mtime, mtime))
    time.sleep(0.1)
    tstamp = secs_to_timestamp(mtime, seps=('-', '    ', ':'))
    self._link(("Set    modified    time    of    '%%s'    to    %s." % tstamp), path)
