diff options
author | rizzo <rizzo@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-06-28 19:02:31 +0000 |
---|---|---|
committer | rizzo <rizzo@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-06-28 19:02:31 +0000 |
commit | d4c61d0bad6f73461d471799d9037f7f00792c27 (patch) | |
tree | 0a3441592e35bc2aff5768a2653af311fb770258 /apps/app_sms.c | |
parent | 86416cfc9164e054dbac60f8eec443ed9a6dba8d (diff) |
move variable declarations to the beginning of a block.
Not applicable to previous branches.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@72457 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps/app_sms.c')
-rw-r--r-- | apps/app_sms.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/apps/app_sms.c b/apps/app_sms.c index b375a7f07..a6fb5abfc 100644 --- a/apps/app_sms.c +++ b/apps/app_sms.c @@ -512,11 +512,13 @@ static int packsms(unsigned char dcs, unsigned char *base, unsigned int udhl, un static void packdate(unsigned char *o, time_t w) { struct tm t; + int z; + ast_localtime(&w, &t, NULL); #if defined(__FreeBSD__) || defined(__OpenBSD__) || defined( __NetBSD__ ) || defined(__APPLE__) - int z = -t.tm_gmtoff / 60 / 15; + z = -t.tm_gmtoff / 60 / 15; #else - int z = timezone / 60 / 15; + z = timezone / 60 / 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; |