Playing with datetime...

 

Hi,

Setting the date, manually, in Alert 2 to todays date, why does Alert 1 return a different value than Alert 2? Even using TimeLocal() as opposed to TimeCurrent() yields the same returns.

#property indicator_chart_window

int start()

{
datetime x=TimeYear(TimeCurrent());
datetime y=TimeMonth(TimeCurrent());
datetime z=TimeDay(TimeCurrent());
Alert("-----------------------------");
Alert("1: ", D'x.y.z 23:59:00');
Alert("2: ", D'2007.6.28 23:59:00');
Alert("3: ", x);
Alert("4: ", y);
Alert("5: ", z);
}

What am I doing wrong?

Regards, lucidlamp

Reason: