[Asterisk-cvs] asterisk/apps app_sms.c,1.1,1.2
markster at lists.digium.com
markster at lists.digium.com
Sat May 15 18:40:47 CDT 2004
Update of /usr/cvsroot/asterisk/apps
In directory mongoose.digium.com:/tmp/cvs-serv19595/apps
Modified Files:
app_sms.c
Log Message:
Fix timezone handling for FreeBSD
Index: app_sms.c
===================================================================
RCS file: /usr/cvsroot/asterisk/apps/app_sms.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- app_sms.c 28 Apr 2004 20:43:06 -0000 1.1
+++ app_sms.c 15 May 2004 22:52:12 -0000 1.2
@@ -204,7 +204,11 @@
packdate (unsigned char *o, time_t w)
{
struct tm *t = localtime (&w);
+#ifdef __FreeBSD__
+ int z = - t->tm_gmtoff / 3600 / 15;
+#else
int z = timezone / 3600 / 15;
+#endif
*o++ = ((t->tm_year % 10) << 4) + (t->tm_year % 100) / 10;
*o++ = (((t->tm_mon + 1) % 10) << 4) + (t->tm_mon + 1) / 10;
*o++ = ((t->tm_mday % 10) << 4) + t->tm_mday / 10;
More information about the svn-commits
mailing list