public TimeSeries Shift(int offset)
{
var ts = new TimeSeries(this.name, this.description, -1);
var num = offset < 0 ? Math.Abs(offset) : 0;
for (var i = num; i < Count; i++)
{
var num2 = i + offset;
if (num2 >= Count)
{
break;
}
var dateTime = GetDateTime(num2);
var value = this[i];
ts[dateTime] = value;
}
return ts;
}