Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

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

I'm working with two virtualized servers which keep time extremely poorly for some reason, so that one is always a little bit ahead of the other (up to 2 seconds). The problem I'm having is that I build packages on the one "in the future", and then the other machine refuses to install them. The build-upload-install is one step, so I could potentially just add a delay, but I'd prefer not to.

Is there a way to tell dpkg to just ignore the timestamp?

The error message looks like this:

 [exec] Command: sudo /usr/bin/dpkg -i /home/deploy/Media/Media_2011-09-06_100724.deb
 [exec] Error: tar: ./control: time stamp 2011-09-06 10:07:47 is 2.68160212 s in the future
 [exec] tar: ./control-template: time stamp 2011-09-06 10:07:46 is 1.681412205 s in the future
 [exec] tar: ./postinst: time stamp 2011-09-06 10:07:46 is 1.681347869 s in the future
 [exec] tar: .: time stamp 2011-09-06 10:07:47 is 2.681313485 s in the future

(it's part of an ant script)

share|improve this question
Probably a --force-all could help, nevertheless it is overkill. I would see the exact error message. – enzotib Sep 6 '11 at 16:05
I think fixing your time problem shouldn't be very complicated and is the best way to solve your problem instead of looking for some workaround to ignore it. – laurent Sep 6 '11 at 16:16
What's the error you see? How are you installing the package? – Iain Lane Sep 6 '11 at 17:54
@Iain Lane, I added the error message – Brendan Long Sep 6 '11 at 18:53

The best option would be to install the ntp package to get time sync working correctly, but barring that, you could trick the other system's "dpkg" into thinking it is living in the future by installing the faketime package, and running it with "-f +10s":

$ date +%H:%M:%S; faketime -f +10s date +%H:%M:%S
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.