-1

How do i get current time from different time zones with TIdDayTimeServer?

for example I set TIdDayTimeServer TimeZone to EST or BST and i want show the date and time on a label.

thanx.

InnocentKiller
  • 5,234
  • 7
  • 36
  • 84
Hamid
  • 103
  • 1
  • 7

1 Answers1

1

That is not how the DAYTIME protocol works, and thus are not how TIdDayTimeServer and TIdDayTimeUDPServer are implemented. The server's local date/time with the specified TimeZone property appended to the end of it is sent to the client as soon as it connects to the server. There is no way to ask the server for a specific timezone.

The same applies to the TIME protocol (the TIdTimeServer and TIdTimeUDPServer components) as well. The local date/time is returned to the client, just in a binary format whereas DAYTIME returns the local date/time in a string format.

You need to find another solution to your problem.

Community
  • 1
  • 1
Remy Lebeau
  • 555,201
  • 31
  • 458
  • 770