mirror of
https://github.com/zeek/zeek.git
synced 2025-10-15 13:08:20 +00:00
Merge remote-tracking branch 'origin/topic/timw/windows-gmtoff'
* origin/topic/timw/windows-gmtoff: Skip setting tm_gmtoff on Windows
This commit is contained in:
commit
8c9a35fb73
3 changed files with 13 additions and 2 deletions
8
CHANGES
8
CHANGES
|
@ -1,3 +1,11 @@
|
||||||
|
8.1.0-dev.664 | 2025-10-10 09:19:40 -0700
|
||||||
|
|
||||||
|
* Skip setting tm_gmtoff on Windows (Tim Wojtulewicz, Corelight)
|
||||||
|
|
||||||
|
tm_gmtoff is a POSIX extension to the tm struct that Windows doesn't
|
||||||
|
support it. It doesn't appear to change the output from the btest,
|
||||||
|
so we can just skip it.
|
||||||
|
|
||||||
8.1.0-dev.662 | 2025-10-10 12:52:02 +0200
|
8.1.0-dev.662 | 2025-10-10 12:52:02 +0200
|
||||||
|
|
||||||
* Bump CI to freebsd-13.5 (Benjamin Bannier, Corelight)
|
* Bump CI to freebsd-13.5 (Benjamin Bannier, Corelight)
|
||||||
|
|
2
VERSION
2
VERSION
|
@ -1 +1 @@
|
||||||
8.1.0-dev.662
|
8.1.0-dev.664
|
||||||
|
|
|
@ -33,9 +33,12 @@ double time_from_lanman(uint32_t smb_time, uint32_t smb_date, uint16_t tz)
|
||||||
lTime.tm_year = ((smb_date >> 9) & 0x7f) + 80;
|
lTime.tm_year = ((smb_date >> 9) & 0x7f) + 80;
|
||||||
lTime.tm_isdst = -1;
|
lTime.tm_isdst = -1;
|
||||||
|
|
||||||
|
#ifndef _MSC_VER
|
||||||
// The timezone passed in the data is the number of minutes from UTC, while
|
// The timezone passed in the data is the number of minutes from UTC, while
|
||||||
// tm_gmtoff is the number of seconds east of UTC. Adjust for that.
|
// tm_gmtoff is the number of seconds east of UTC. Adjust for that. This field
|
||||||
|
// is a POSIX extension that Windows doesn't support.
|
||||||
lTime.tm_gmtoff = static_cast<long>(tz) * 60;
|
lTime.tm_gmtoff = static_cast<long>(tz) * 60;
|
||||||
|
#endif
|
||||||
|
|
||||||
return timegm(&lTime);
|
return timegm(&lTime);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue