Uses time since epoch instead of gmtime

Fixes the issue which caused the acceptable time difference
to be some really weird numbers.