diff options
author | markster <markster@f38db490-d61c-443f-a65b-d21fe96a405b> | 2004-05-15 22:52:12 +0000 |
---|---|---|
committer | markster <markster@f38db490-d61c-443f-a65b-d21fe96a405b> | 2004-05-15 22:52:12 +0000 |
commit | 349ca058eeedd5ac73b991a88bbc90e7faefaabd (patch) | |
tree | 58adb2d1578ec5ca4638ab114dda930fa613ff80 /apps/app_sms.c | |
parent | bdd177c0af5508f77a75dbaa1707756beb47dacf (diff) |
Fix timezone handling for FreeBSD
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@2972 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps/app_sms.c')
-rwxr-xr-x | apps/app_sms.c | 4 |
1 files changed, 4 insertions, 0 deletions
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; |