Fixing a conversion bug whith dates.

The code was using the format of the local machine which may not be the
same as RPM.