Fixed overflow bug.
Added check for graph timespan overflowing if time_t is 32 bits.