Unverified Commit a888503b authored by dingrui's avatar dingrui Committed by GitHub
Browse files

Remove unnecessary argument(tp) in gettimeofday() call for retrieving timezone (#12722)

changes the `gettimeofday` caller, by removing an unused optional output argument.

It would take 2 benefits:

- simplify code, discard unnecessary arg.
- possibly faster due to the implementation in kernel.
parent 282b82e9
......@@ -993,10 +993,9 @@ long getTimeZone(void) {
#if defined(__linux__) || defined(__sun)
return timezone;
#else
struct timeval tv;
struct timezone tz;
gettimeofday(&tv, &tz);
gettimeofday(NULL, &tz);
return tz.tz_minuteswest * 60L;
#endif
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment