From f222665d1d989277b1042ecf885d41cf7e1bece9 Mon Sep 17 00:00:00 2001 From: Mark Spencer Date: Sat, 15 May 2004 22:52:12 +0000 Subject: Fix timezone handling for FreeBSD git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2972 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- apps/app_sms.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'apps/app_sms.c') diff --git a/apps/app_sms.c b/apps/app_sms.c index 8b6d0cb44..6baeaf80e 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; -- cgit v1.2.3