Update of /cvsroot/pure-data/externals/mrpeach/osc
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5896
Modified Files:
unpackOSC.c packOSC.c
Log Message:
Removed timezone calculation from timestamp so timestamp is always UTC.
Index: packOSC.c
===================================================================
RCS file: /cvsroot/pure-data/externals/mrpeach/osc/packOSC.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** packOSC.c 15 Jul 2007 18:00:20 -0000 1.8
--- packOSC.c 1 Sep 2007 16:39:26 -0000 1.9
***************
*** 1291,1297 ****
/* 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) offset/onemillion;
/* Now get the fractional part. */
--- 1291,1295 ----
/* First get the seconds right */
tt.seconds = (unsigned) SECONDS_FROM_1900_to_1970 +
! (unsigned) tv.tv_sec +
(unsigned) offset/onemillion;
/* Now get the fractional part. */
Index: unpackOSC.c
===================================================================
RCS file: /cvsroot/pure-data/externals/mrpeach/osc/unpackOSC.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** unpackOSC.c 15 Jul 2007 18:00:20 -0000 1.7
--- unpackOSC.c 1 Sep 2007 16:39:26 -0000 1.8
***************
*** 619,624 ****
_ftime(&tb); /* find now */
/* First get the seconds right */
! 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;
--- 619,623 ----
_ftime(&tb); /* find now */
/* First get the seconds right */
! 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;
***************
*** 630,637 ****
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);
/* find usec in tt */
ttusec = tt.seconds*onemillion + ONE_MILLION_OVER_TWO_TO_THE_32*tt.fraction;
--- 629,633 ----
gettimeofday(&tv, &tz); /* find now */
/* First get the seconds right */
! 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;