My advice is always the same, if your system time is accurate, but the
command "getinfo", reports for timeoffset a value far to zero, try
to restart your wallet and after a while, check it again.
out of curiosity what would an ideal timeoffset be would that be zero? I was just looking and mine says 22. Thanks
I love the curiosity, I consider it the fuel of progress.
In an ideal world, all computers would have their time reference perfectly
synchronized between them, so their timeoffset would be exactly zero.
This is not a perfect world, and although there are atomic clocks as a reference
of great precision, and in the operating systems there are tools to keep
synchronized the systems, often they are used very loosely, for example once
a week when the computer has already accumulated a quite offset, or
worst not used at all.
In my case, I have a PC and I forced to resynchronize every 4 hours,
and with a wallet (almost) always active, the present timeoffset of
my wallet is -3.
Synchronize every 4 hours is somewhat exaggerated, but when you want to do
measurements, the first thing to do is to always double check your instrument.
The process that the wallet used to arrive at a time shared, is based on
the timeoffset, and the system to calculate it, said in "few" words
is more or less this:
The wallet when connecting to another peer, exchange information of the
respective time, and each one calculates the relative offset from the other.
If the ip of the other peer has already been seen, nothing is done.
Otherwise, his timeoffset is put in a table, and if the table gets to 200 items,
the oldest item is discarded.
A copy of this table is sorted according to the offset, and it is taken the
value of the central item, and that will be the new timeoffset of the allet.
The heart of this process, it can be found in the function AddTimeData,
it is in the file utils.c, and is used in the standard code of many
different coin wallet.
Finally, some comment lines in the code, already present in some older
versions of bitcoin wallet, would seem to suggest that this process of using
the median time was to be only a temporary stopgap, pending a more precise.
I believe that this system, reasonable, has been designed for networks with
a higher number of peers, in which case the table would be continuously updated.
But IMHO, in a network with few nodes and always the same, I think that shows
its limits and can be easily influenced, or continue to consider data which
can be very outdated.
Restart the wallet is a simple way to clear the table, and acquire new
offsets of other peers. But it can give good result, or bad.
Taking a look at this table in my wallet, online for nearly a week, now
it consists of only 51 elements and values are from -71 to +81,
this is definitely not an ideal world, but it seems that most of the other
wallet has an offset from between -6 and -1 seconds, more reasonable.
So if your wallet shows a timeoffset of 22, and your PC is perfectly
synchronized with the rest of the world's clock, then IMHO probably
should try to restart your wallet.
Sorry if the answer comes... late.