From charlesreid1

Revision as of 01:48, 10 July 2016 by Admin (talk | contribs)

Documentation: https://github.com/wolfcw/libfaketime/blob/master/README.OSX

Unfortunately, the /bin/date program doesn't seem to be affected by libfaketime, probably because Apple decided it was a vulnerability in /bin/date and changed it to be statically linked.

However, it does work with Python:

$ faketime '2008-12-25 08:00:00' python
Python 2.7.10 (v2.7.10:15c95b7d81dc, May 23 2015, 09:33:12)
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import datetime
>>> print datetime.datetime.now()
2008-12-25 08:00:12.829915
>>>