Desktop version

Main > Forum > 1C:Enterprise Platform > 1C:Enterprise – Business applications platform > How to Get Time from Internet

Forum

Search UsersRules
How to Get Time from Internet
#1
Active user
Points:: 2
Joined:: Sep 16, 2011

There are time servers (time.nist.gov, time.windows.com, etc.). I need to implement a function which gets and parses time from one of those servers. If anyone did something like that already? Any ideas on how to do that?

Profile
#2
Active user
Points:: 32
Joined:: Sep 16, 2011

You can use the following code:

Code
Connection = New HTTPConnection("time.nist.gov", 13);
Connection.Get("time.nist.gov", TempFileName);

The file with TempFileName name will contain the string like following:

58012 12-03-29 11:23:33 50 0 0 905.3 UTC(NIST) *

Profile
Subscribe
Users browsing this topic (guests: 1, registered: 0, hidden: 0)



© 1C LLC. All rights reserved
1C Company respects the privacy of our customers and visitors
to our Web-site.