MqlDateTime Returns 0 In Strategy Tester But Works On Live Account


Hi everyone,

Hoping someone can help me with this.

When I call for the current Hour and Minute using the below code, it returns the correct information on live data but when using it in strategy tester it always returns 0.

Any ideas?

   MqlDateTime dt_struct;
   datetime dtSer = TimeCurrent(dt_struct);

   Print("Server Hour Is " + dt_struct.hour);
   Print("Server Min Is " + dt_struct.min);

This is the output when using live (correct):

Live Result

This is the output when using in strategy tester (incorrect):

Strategy Tester

Any Assistance will be greatly appreciated.