Add a function to set the maximum difference between timestamps when calculating ranges
Use bcmath functions