'Patch the L{ls} module\'s time function so the results of L{lsLine} are
deterministic.'

def setUp(self):

    self.now = 123456789
    def fakeTime():
        return self.now
    self.patch(ls, 'time', fakeTime)
    if ('TZ' in os.environ):
        self.addCleanup(operator.setitem, os.environ, 'TZ', os.environ['TZ'])
        self.addCleanup(time.tzset)
    else:
        def cleanup():
            try:
                del os.environ['TZ']
            except KeyError:
                pass
            time.tzset()
        self.addCleanup(cleanup)
