aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xosc/packOSC.c4
-rwxr-xr-xosc/unpackOSC.c8
2 files changed, 3 insertions, 9 deletions
diff --git a/osc/packOSC.c b/osc/packOSC.c
index 1a604a4..0849769 100755
--- a/osc/packOSC.c
+++ b/osc/packOSC.c
@@ -1290,9 +1290,7 @@ static OSCTimeTag OSCTT_CurrentTimePlusOffset(uint4 offset)
/* First get the seconds right */
tt.seconds = (unsigned) SECONDS_FROM_1900_to_1970 +
- (unsigned) tv.tv_sec -
- (unsigned) 60 * tz.tz_minuteswest +
- (unsigned) (tz.tz_dsttime ? 3600 : 0)+
+ (unsigned) tv.tv_sec +
(unsigned) offset/onemillion;
/* Now get the fractional part. */
tt.fraction = (unsigned) tv.tv_usec + (unsigned)(offset%onemillion); /* in usec */
diff --git a/osc/unpackOSC.c b/osc/unpackOSC.c
index c1ca36a..096ac0c 100755
--- a/osc/unpackOSC.c
+++ b/osc/unpackOSC.c
@@ -618,8 +618,7 @@ static t_float unpackOSC_DeltaTime(OSCTimeTag tt)
_ftime(&tb); /* find now */
/* First get the seconds right */
- ttnow.seconds = (unsigned) SECONDS_FROM_1900_to_1970 +
- (unsigned) tb.time;
+ ttnow.seconds = (unsigned) SECONDS_FROM_1900_to_1970 + (unsigned) tb.time;
/* find usec in tt */
ttusec = tt.seconds*onemillion + ONE_MILLION_OVER_TWO_TO_THE_32*tt.fraction;
nowusec = ttnow.seconds*onemillion + tb.millitm*onethousand;
@@ -629,10 +628,7 @@ static t_float unpackOSC_DeltaTime(OSCTimeTag tt)
gettimeofday(&tv, &tz); /* find now */
/* First get the seconds right */
- ttnow.seconds = (unsigned) SECONDS_FROM_1900_to_1970 +
- (unsigned) tv.tv_sec -
- (unsigned) 60 * tz.tz_minuteswest +
- (unsigned) (tz.tz_dsttime ? 3600 : 0);
+ ttnow.seconds = (unsigned) SECONDS_FROM_1900_to_1970 + (unsigned) tv.tv_sec;
/* find usec in tt */
ttusec = tt.seconds*onemillion + ONE_MILLION_OVER_TWO_TO_THE_32*tt.fraction;
nowusec = ttnow.seconds*onemillion + tv.tv_usec;