1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-10-19 19:59:43 +00:00

math/octave-forge-biosig: Correction to invokation of localtime.

Bump portrevision.
This commit is contained in:
Stephen Montgomery-Smith 2022-10-28 16:58:03 -05:00
parent 21b6aaf8ec
commit 76878a2b78
2 changed files with 12 additions and 3 deletions

View File

@ -1,5 +1,6 @@
PORTNAME= octave-forge-biosig
DISTVERSION= 3.0.1
PORTREVISION= 1
CATEGORIES= math
MASTER_SITES= https://pub.ist.ac.at/~schloegl/biosig/prereleases/
DISTNAME= biosig4octave-${DISTVERSION}.src

View File

@ -1,11 +1,19 @@
--- mexSSAVE.cpp.orig 2022-10-28 21:23:00 UTC
--- mexSSAVE.cpp.orig 2021-07-14 20:07:43 UTC
+++ mexSSAVE.cpp
@@ -202,7 +202,7 @@ void mexFunction(
@@ -87,6 +87,7 @@ void mexFunction(
HDRTYPE *hdr;
size_t count;
time_t T0;
+ time_t zero = 0;
char *FileName;
char tmpstr[128];
int status;
@@ -202,7 +203,7 @@ void mexFunction(
if ( (p = mxGetField(prhs[0], 0, "tzmin") ) != NULL )
hdr->tzmin = (int16_t)getDouble(p, 0);
else
- hdr->tzmin = -timezone/60;
+ hdr->tzmin = -localtime(0)->tm_gmtoff/60;
+ hdr->tzmin = -localtime(&zero)->tm_gmtoff/60;
if ( (p = mxGetField(prhs[0], 0, "FileName") ) != NULL ) FileName = mxArrayToString(p);
if ( (p = mxGetField(prhs[0], 0, "SampleRate") ) != NULL ) hdr->SampleRate = getDouble(p, 0);
if ( (p = mxGetField(prhs[0], 0, "NS") ) != NULL ) hdr->NS = getDouble(p, 0);