The code in org.openmrs.SimpleDosingInstructions#getAutoExpireDate does aMomentBefore(...).
The "aMomentBefore" code subtracts one millisecond, however MySQL dates are only accurate to the second, therefore when this is actually written to the database, the aMomentBefore function has had no effect.
E.g. I just created a drug order with date_activated = 2015-01-05 10:24:30 and duration of 7 days, so the auto_expire_date was calculated to 2015-01-12 10:24:30.
I believe the fix is to change the aMomentBefore function to subtract 1s instead of 1ms.
TRUNK-4252 I have a Hibernate interceptor running that plays around with dates, so there's a small possibility that the behavior I'm seeing is related to that.)