toTimeDiff - multiple declarations
Function toTimeDiff
Function to extract a time difference from a binary encoded row.
Time/date structures are packed by the server into a byte sub-packet with a leading length byte, and a minimal number of bytes to embody the data.
Parameters
Name | Description |
---|---|
a | slice of a protocol packet beginning at the length byte for a chunk of time data |
Returns
A populated or default initialized TimeDiff struct.
Function toTimeDiff
Function to extract a time difference from a text encoded column value.
Text representations of a time difference are like -750:12:02 - 750 hours 12 minutes and two seconds ago.
Parameters
Name | Description |
---|---|
s | A string representation of the time difference. |
Returns
A populated or default initialized TimeDiff struct.