Replace atoi with strtol: Initial Patch

1.Modified atoi with strtol and strtoll depending upon the system that is 32bit or 64bit. This will help to represent more year's with 64bit system and atlast ensuring that conversion of second's at last occurs in time_t format by type casting it.
2.Also checked for underflow or overflow condition using errno variable.