Libfaketime: Difference between revisions
From charlesreid1
(Created page with "<pre> $ 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", "c...") |
No edit summary |
||
| Line 1: | Line 1: | ||
Documentation: https://github.com/wolfcw/libfaketime/blob/master/README.OSX | |||
Unfortunately, the <code>/bin/date</code> program doesn't seem to be affected by libfaketime, probably because Apple decided it was a vulnerability in <code>/bin/date</code> and changed it to be statically linked. | |||
However, it does work with Python: | |||
<pre> | <pre> | ||
$ faketime '2008-12-25 08:00:00' python | $ faketime '2008-12-25 08:00:00' python | ||
Revision as of 01:48, 10 July 2016
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 >>>