in reply to working with epoch seconds

%s seems to be a non-portable extension; I'm not sure what it is supposed to return. If you are looking for the reverse of gmtime, try Time::Local's timegm.