I am connected to a network, but not joined to a domain (in the same network), I still can access some of the allowed resources in the domain. If I am connected to this domain then the time will be automatically set but this way it is not. Is there a way to get the current time in the domain which is available in the same network I am connected to? I know the domain's name.
Asked
Active
Viewed 187 times
0
-
do you have domain login credentials accessible for your program? – Benjamin Trent Nov 07 '13 at 22:10
-
1Maybe if the DomainController(or gateway/router/) computer has [NTP](http://en.wikipedia.org/wiki/Network_Time_Protocol) service running, then using the NTP service. – keenthinker Nov 07 '13 at 22:10
-
@pasty is correct. That would be the best way. An SO question has answered the NTP situation http://stackoverflow.com/questions/1193955/how-to-query-an-ntp-server-using-c – Benjamin Trent Nov 07 '13 at 22:12
-
@bwtrent I have a valid login credentials for that domain.. – Nov 07 '13 at 22:17
-
Are you trying to do the same thing as `net.exe time /DOMAIN:otherdomain` ? – Ben Voigt Nov 07 '13 at 23:29
-
@BenVoigt u got it right! – Nov 07 '13 at 23:35
1 Answers
1
There have been numerous SO questions on how to get another server's time. You need to find out what NTP server they are syncing against and query that server. This question and this one should get you to where you can update your time. The domain should have their ntp.domain.com open for that network but you can not be sure on what their systems engineer/administrator decided to do.
Also, most networks that are smaller simply sync against a known good public NTP server.

Community
- 1
- 1

Benjamin Trent
- 7,378
- 3
- 31
- 41