I have been analyzing the JSON file generated using chrome://webrtc-internal, while running webrtc. I'm trying to find the matching timezone of the startTime in the following result:
'RTCVideoSource_6-width': {
'startTime': '2021-04-14T07:09:33.163Z',
'endTime': '2021-04-14T07:14:12.161Z',
'values': '[1920,1920,1920,1920,1920,1920,1920,1920,1920]'},
I tried UTC timezone to find the corresponding timestamp in my timezone but didn't succeed.
yourdate = dateutil.parser.parse(RTCVideoSource_6-width['startTime'])
startTime_utc = yourdate.replace(tzinfo=pytz.UTC)
startTime_hk=startTime_utc.astimezone(pytz.timezone("Asia/Hong_Kong")) #astimezone method
#since 1970
startAge_utc = datetime.datetime(1970,1,1).replace(tzinfo=pytz.UTC)
startAge_hk=startAge_utc.astimezone(pytz.timezone("Asia/Hong_Kong")) #astimezone method
start_in_seconds = int((startTime_hk- startAge_hk).total_seconds())
When I compared now()
as a timestamp in seconds, I got values with a relatively big difference,
1618384173
and 1618383543
.
What is the timezone used in chrome://webrtc-internal stats? Is my conversion method correct?