Removed timezone usage in UnixRealTimeClock::CurrentTimeVal when calling gettimeofday.

Timezone (tz) was unused in this case. When porting webRTC to certain platforms it caused runtime asserts when unsupported.
Additionally, the timezone parameter is obsolete and should now be NULL according to
https://man7.org/linux/man-pages/man2/gettimeofday.2.html.

Bug: None
Change-Id: Ic9183dd79b371ddcaad5da797ccb91beeea2be2f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/236722
Reviewed-by: Henrik Andreassson <henrika@webrtc.org>
Reviewed-by: Magnus Flodman <mflodman@webrtc.org>
Commit-Queue: Magnus Flodman <mflodman@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35293}
This commit is contained in:
John Elliott 2021-10-29 11:57:15 -07:00 committed by WebRTC LUCI CQ
parent d3eb8f1152
commit 59aba46c6f

View File

@ -248,10 +248,7 @@ class UnixRealTimeClock : public RealTimeClock {
protected:
timeval CurrentTimeVal() override {
struct timeval tv;
struct timezone tz;
tz.tz_minuteswest = 0;
tz.tz_dsttime = 0;
gettimeofday(&tv, &tz);
gettimeofday(&tv, nullptr);
return tv;
}
};