Bug at TimeToStr() ?

 
//+------------------------------------------------------------------+
//| Custom indicator iteration function                              |
//+------------------------------------------------------------------+
int start()
  {
   int    counted_bars=IndicatorCounted();
//----
      Print(TimeToStr(1146143265));
   Print(TimeToStr(1146143265+2));
   Print(TimeToStr(1146143265+4));
   Print(TimeToStr(1146143265+6));
   Print(TimeToStr(1146143265+8));
   Print(TimeToStr(1146143265+10));
   Print(TimeToStr(1146143265+12));
//----
   return(0);
  }



They all return date of 2006.04.27 13:07
Build 191 08, March 2006

 
I think this not an error in the function. because you are adding seconds to these values which will not change them.
The returned string format is "yyyy.mm.dd hh:mi".

Try:
Print(TimeToStr(1146143265+120));
Which means adding 2 minutes to 2006.04.27 13:07
 
I think this not an error in the function. because you are adding seconds to these values which will not change them.
The returned string format is "yyyy.mm.dd hh:mi".

Try:
Print(TimeToStr(1146143265+120));
Which means adding 2 minutes to 2006.04.27 13:07

Very good point!
I stand corrected!
My error by using Period() and not multiplying it by 60.
You have saved my day!
Thanks!
 
I think this not an error in the function. because you are adding seconds to these values which will not change them.
The returned string format is "yyyy.mm.dd hh:mi".

Try:
Print(TimeToStr(1146143265+120));
Which means adding 2 minutes to 2006.04.27 13:07

Very good point!
I stand corrected!
My error by using Period() and not multiplying it by 60.
You have saved my day!
Thanks!

:D You're welcome!
Reason: