What do the adjust reasons in the BLE current time characteristic mean? - bluetooth-lowenergy

I am implementing a CTS (current time service) synchronization method. Here is the documentation on the current time characteristic (one of the characteristics in the CTS).
What do 'Manual time update' and 'External reference time update' mean, and what do they change on the device I am writing the current time on?
I have searched SO, WWW, and the Bluetooth SIG group but not found any further explanation than the names of those fields.

The specification document for Current Time Service defines these values (download pdf here from bluetooth.com).
Specifically, section 3.1.2 Characteristic Behavior -- Notification:
The server device shall set the Adjust Reason field in the Current Time to reflect the
reason for the last adjustment of the local time on the server device.
...
3.1.2.1 Manual Time Update
If the time information on the server device was set / changed manually,
the “Manual Time Update” bit shall be set.
Note: If the time zone or DST offset were changed manually, this bit shall also be set.
3.1.2.2 External Reference Time Update
If the server device received time information from an
external time reference source,
the External Reference Time Update bit shall be set.
3.1.2.3 Change of Time Zone
If the time information on the server device was set / adjusted
because of change of time zone, the “Change of Time Zone” bit shall be set.
Note: Following 3.1.2.1, if the time zone was changed manually the “Manual Time
Update” bit will also be set.
3.1.2.4 Change of DST Offset
If the time information on the server device was set / adjusted
because of change of DST offset, the “Change of DST offset” bit shall be set.
Note: Following 3.1.2.1, if the DST offset was changed manually, the “Manual Time
Update” bit will also be set.

Related

How to get the time not from the device but from the internet?

I have a problem that If a person clock is not set correctly the app will take this time rather than the correct one that's why I wanted to take the time now form the internet. any idea ?
Note: I have used DateTime.now() and it provide back the mobile time not the real time

OpenvSwitch port missing in large load, long poll interval observed

ISSUE description
I have a OpenStack system with HA management network (VIP) via ovs (Open vSwitch) port, it's found in this system, with high load (concurrently volume-from-glance-image creation), the VIP port (an ovs port) will be missing.
Analysis
For now, with default log level from log file, the only thing observed is as below the Unreasonably long 62741ms poll interval.
2017-12-29T16:40:38.611Z|00001|timeval(revalidator70)|WARN|Unreasonably long 62741ms poll interval (0ms user, 0ms system)
Idea for now
I will turn debug log on for file and try reproducing the issue:
sudo ovs-appctl vlog/set file:dbg
Question
What else should I do during/after of the issue reproduction please?
Is this issue typical? Caused by what if yes?
I googled OpenvSwitch trouble shoot or other related key words while information was all on data flow/table level instead of this ovs-vswitchd level ( am I right? )
Many thanks!
BR//Wey
This issue was not reproduced and thus I forgot about it, until recently, 2 years afterward, I had a chance to get in touch with this issue in a different environment, and this time I have more ideas on its root cause.
It could be caused by the shift that comes in the bonding, for some reason, the traffic pattern fits the situation of triggering shifts again and again(the condition is quite strong I would say but there is a chance to be hit anyway, right?).
The condition of the shift was quoted as below and please refer to the full doc here: https://docs.openvswitch.org/en/latest/topics/bonding/
Bond Packet Output
When a packet is sent out a bond port, the bond member actually used is selected based on the packet’s source MAC and VLAN tag (see bond_choose_output_member()). In particular, the source MAC and VLAN tag are hashed into one of 256 values, and that value is looked up in a hash table (the “bond hash”) kept in the bond_hash member of struct port. The hash table entry identifies a bond member. If no bond member has yet been chosen for that hash table entry, vswitchd chooses one arbitrarily.
Every 10 seconds, vswitchd rebalances the bond members (see bond_rebalance()). To rebalance, vswitchd examines the statistics for the number of bytes transmitted by each member over approximately the past minute, with data sent more recently weighted more heavily than data sent less recently. It considers each of the members in order from most-loaded to least-loaded. If highly loaded member H is significantly more heavily loaded than the least-loaded member L, and member H carries at least two hashes, then vswitchd shifts one of H’s hashes to L. However, vswitchd will only shift a hash from H to L if it will decrease the ratio of the load between H and L by at least 0.1.
Currently, “significantly more loaded” means that H must carry at least 1 Mbps more traffic, and that traffic must be at least 3% greater than L’s.

Should I have trust in the system time?

Whenever I log something i ask myself: "What if this runs on an computer with incorrect time settings?"
The local time can be wrong but am I right that this might also be the case with UTC time?
My current approach is to get the NIST time and just write it on top of every log file together with the UTC and local time so the user looking at the log file can see how the time inside the log is related to the real world time.
Is this correct behaviour to print NIST + UTC + Local time on top of every logfile + a small info message on how time work?
This of course assumes that if their clock is incorrect it stays incorrect in the same way throuout the full log file

Current time in blackberry

Hi I need to know how can I get current time in blackberry if I change the device time
I am using system.getcurrenttimemillis() method
Is it possible ???
Or concept of network time comes into this
System.currentTimeMillis gives you a timestamp in UTC, which is roughly the time in the Greenwich Meridian.
If your time is updated via network or changed in settings then the returned value changes as well.

QGeoPositionInfoSource: What and where are the system's default "sources of location data"?

The following quote is from this link: http://apidocs.meego.com/1.2-preview/qtmobility/qgeopositioninfosource.html#createDefaultSource
Creates and returns a position source
with the given parent that reads from
the system's default sources of
location data, or the plugin with the
highest available priority.
What and where are the system's default "sources of location data"? Any examples?
And what do I need to read to understand these concepts?
The default source depends on the Device.
As to the question regarding what the sources might be , here is an extract from forum.nokia documentation regarding symbian phones , although this is mostly true in reference to other devices and platforms as well
GPS based: It can provide location estimation with accuracy from 10 to 30 meters. Depending on the actual technology and the state of GPS module, time to first fix varies from several seconds to minutes. Time to next fix is normally 1 second. It may not work indoor. The GPS module, which makes location estimation, may reside internally (e.g. integrated GPS) or externally (e.g. Bluetooth GPS) of the terminal.
Assisted GPS: Assisted GPS technology improves performance (i.e. time to first fix and sensitivity) by acquiring assistant data from an assistance server. The mobile phone receives the assistant data from wireless network. Depends on the operator and subscription, end user may have to pay for receiving assistant data.
Network based: It can provide location estimation with accuracy from a hundred meter to several kilometers. Time to first fix and time to next fix is normally within 10 seconds. It works also indoor. It normally requires support from operator.

Resources