Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Running Mac OS 10.7.2 and trying to run libfaketime and nothing happen. I installed and ran exactly as directed only the time and date stay exactly as are set in the system? Is anyone else able to successfully run this on OSX?

$ date
Mon Jan 30 21:05:09 CST 2012
$ LD_PRELOAD=./libfaketime.so.1 FAKETIME="-15d" date
Mon Jan 30 21:05:32 CST 2012
share|improve this question
Did you read github.com/wolfcw/libfaketime/blob/master/README.OSX ? (That's directly linked from libfaketime's front page.) – Mat Jan 31 '12 at 6:17
up vote 3 down vote accepted

Use DYLD_INSERT_LIBRARIES instead of LD_PRELOAD on Mac OS. You may need to set DYLD_FORCE_FLAT_NAMESPACE as well. E.g.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.