From: Mark Spencer Date: Sat, 15 May 2004 22:52:12 +0000 (+0000) Subject: Fix timezone handling for FreeBSD X-Git-Tag: 1.0.0-rc1~475 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=f222665d1d989277b1042ecf885d41cf7e1bece9;p=thirdparty%2Fasterisk.git Fix timezone handling for FreeBSD git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2972 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/apps/app_sms.c b/apps/app_sms.c index 8b6d0cb447..6baeaf80ee 100755 --- a/apps/app_sms.c +++ b/apps/app_sms.c @@ -204,7 +204,11 @@ static void 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;