public class DaytimeClock extends NetTimeConnector<NetTimeConfiguration>
Represents a connection to a DAYTIME-server following the old norm RFC 867.
Note that the format of the server reply is not specified by the protocol. Furthermore, many internet time servers have stopped to support this old protocol. Actually in year 2014, at least the addresses "time.nist.gov" and "time.ien.it" are still working. Applications cannot expect more than second precision at best.
| Modifier and Type | Field and Description |
|---|---|
static DaytimeClock |
NIST
Defines an instance which supports the NIST-servers using
the multiple-location-address "time.nist.gov" and
a specific format.
|
| Constructor and Description |
|---|
DaytimeClock(String server,
ChronoParser<Moment> parser)
Creates a new instance which uses the given time server on the
port 13.
|
| Modifier and Type | Method and Description |
|---|---|
String |
getRawTimestamp()
Tries to get the raw server timestamp as original string.
|
connect, currentTime, getLastConnectionTime, getLastOffsetInMicros, getNetTimeConfiguration, isLogEnabled, isRunning, reconfigure, setLogWriterinLocalView, inPlatformView, inZonalView, inZonalViewpublic static final DaytimeClock NIST
Defines an instance which supports the NIST-servers using the multiple-location-address "time.nist.gov" and a specific format.
The format is documented at www.nist.gov.
public DaytimeClock(String server, ChronoParser<Moment> parser)
Creates a new instance which uses the given time server on the port 13.
server - time server address (example: "time.nist.gov")parser - object interpreting the server replypublic String getRawTimestamp() throws IOException
Tries to get the raw server timestamp as original string.
IOException - if connection failsCopyright © 2014–2016. All rights reserved.