I want to check on the hour and not the whole date,or minutes or seconds.. Seems like every minute turnover there is a flash its Timezone is wrong,, probably due to milliseconds.
Any suggests on how just to parse out the hour for checking.
DateTime local = DateTime.Now;
DateTime UTCLocal = DateTime.Now.ToUniversalTime().AddHours(-5);//Converts a bars time stamp to Central time, regardless of local time zone.
if (local != UTCLocal)
DrawTextFixed("tradetimes","Check Time Zone!!"+"\n"+"NOT CST"+ "\n" + UTCLocal.ToString(),TextPosition.BottomRight,Color .Black,new Font("Arial",10),Color.Black,Color.Yellow,5);
Comment