# Is this a bug with TimeSeries and dates? [closed]

I'm having trouble with applying Accumulate to TimeSeries data as below

The results of the first call to Accumulate is wrong in length, 4 instead of 5 and value. Is this a bug? It certainly seems so to me, since if I replace T = septimes[[1;;5]] by T=Range[5] all is well. I'm running Mathematica 12.0 on OS X 10.11.6 (El Capitan)

• I cannot reproduce your problem on my side with made up numbers. You should really include your code as text, with data and definitions. Pictures do not help us troubleshoot. May 1 '20 at 15:37

The problem is that your time samples are not regularly sampled. When time intervals are unequal, Accumulate resamples to make a regularly sample series. See the "Possible Issues" section of Time Series documentation for an example similar to your data.
You can make Accumulate assume regular sampling with the TemporalRegularity option.
Values[Accumulate[TimeSeries[s, TemporalRegularity -> True]]]

{-10,-30,-10,-30,-50}