mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-22 20:56:39 +00:00
print out the IAX DATETIME IE in 'iax2 debug' in human readable form
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@5711 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -2764,12 +2764,12 @@ static unsigned int iax2_datetime(char *tz)
|
||||
localtime_r(&t, &tm);
|
||||
if (!ast_strlen_zero(tz))
|
||||
ast_localtime(&t, &tm, tz);
|
||||
tmp = (tm.tm_sec >> 1) & 0x1f; /* 5 bits of seconds */
|
||||
tmp |= (tm.tm_min & 0x3f) << 5; /* 6 bits of minutes */
|
||||
tmp |= (tm.tm_hour & 0x1f) << 11; /* 5 bits of hours */
|
||||
tmp |= (tm.tm_mday & 0x1f) << 16; /* 5 bits of day of month */
|
||||
tmp |= ((tm.tm_mon + 1) & 0xf) << 21; /* 4 bits of month */
|
||||
tmp |= ((tm.tm_year - 100) & 0x7f) << 25; /* 7 bits of year */
|
||||
tmp = (tm.tm_sec >> 1) & 0x1f; /* 5 bits of seconds */
|
||||
tmp |= (tm.tm_min & 0x3f) << 5; /* 6 bits of minutes */
|
||||
tmp |= (tm.tm_hour & 0x1f) << 11; /* 5 bits of hours */
|
||||
tmp |= (tm.tm_mday & 0x1f) << 16; /* 5 bits of day of month */
|
||||
tmp |= ((tm.tm_mon + 1) & 0xf) << 21; /* 4 bits of month */
|
||||
tmp |= ((tm.tm_year - 100) & 0x7f) << 25; /* 7 bits of year */
|
||||
return tmp;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user