Get internet time in delphi
问题 i want to get time and date from internet i used following code IdDayTime1.ReadTimeout := 5000; IdDayTime1.Host := 'www.time.windows.com'; IdDayTime1.Port := 37 ; Label1.Caption := IdDayTime1.DayTimeStr; but i get : socket error # 11004 whats is this and what did i do wrong my internet and other things are ok 回答1: DayTime protocol is not the NTP protocol. DayTime uses port 13, not 37. 37 is used by the Time protocol, which, again, in not the NTP protocol, which uses 123 (UDP). I do not know