bug #2034: Improve cookie expiration time handling