Calculate and set the `.clock_diff`, based on headers from a server response, and the local time of response received.
(self, server_response, localtime_of_response)
| 223 | self._other_events.remove(event) |
| 224 | |
| 225 | def _set_clock_diff(self, server_response, localtime_of_response): |
| 226 | """Calculate and set the `.clock_diff`, based on headers from a server |
| 227 | response, and the local time of response received. |
| 228 | """ |
| 229 | try: |
| 230 | server_time = datetime_to_timestamp(parse(server_response.headers['date'])) |
| 231 | except: |
| 232 | server_time = 0 |
| 233 | self.clock_diff = abs(server_time - localtime_of_response) |
| 234 | |
| 235 | def _notify_uploaded(self, **metadata): |
| 236 | self._data_id = metadata.get('problem_data_id') |
nothing calls this directly
no test coverage detected