<html><head><meta http-equiv="content-type" content="text/html; charset=UTF-8"><style>body { line-height: 1.5; }blockquote { margin-top: 0px; margin-bottom: 0px; margin-left: 0.5em; }p { margin-top: 0px; margin-bottom: 0px; }div.foxdiv20141104154518177111 { }body { font-size: 10.5pt; font-family: 微软雅黑; color: rgb(0, 0, 0); line-height: 1.5; }</style></head><body>
<div><span></span>Hi All:</div><div><span style="background-color: rgba(0, 0, 0, 0);">&nbsp; &nbsp;&nbsp;</span><span style="background-color: rgba(0, 0, 0, 0); font-size: 10.5pt; line-height: 1.5;">&nbsp; &nbsp; first, thank a lot.</span></div><div><span style="background-color: rgba(0, 0, 0, 0); font-size: 10.5pt; line-height: 1.5;">&nbsp; &nbsp; &nbsp; &nbsp; In my case, I only need C function gmtime.</span></div><div><span style="background-color: rgba(0, 0, 0, 0); font-size: 10.5pt; line-height: 1.5;">&nbsp; &nbsp; &nbsp; &nbsp; but, I think the seconds way is better that have good &nbsp;expansibility.</span></div>
<div><br></div><hr style="width: 210px; height: 1px;" color="#b5c4df" size="1" align="left">
<div><span><div style="MARGIN: 10px; FONT-FAMILY: verdana; FONT-SIZE: 10pt"><div>zhouxiaoqiang.mstech@gmail.com</div></div></span></div>
<blockquote style="margin-top: 0px; margin-bottom: 0px; margin-left: 0.5em;"><div>&nbsp;</div><div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm"><div style="PADDING-RIGHT: 8px; PADDING-LEFT: 8px; FONT-SIZE: 12px;FONT-FAMILY:tahoma;COLOR:#000000; BACKGROUND: #efefef; PADDING-BOTTOM: 8px; PADDING-TOP: 8px"><div><b>From:</b>&nbsp;<a href="mailto:notifications@github.com">Di-Shi Sun</a></div><div><b>Date:</b>&nbsp;2014-11-04&nbsp;15:39</div><div><b>To:</b>&nbsp;<a href="mailto:devel@lists.opensips.org">devel</a></div><div><b>Subject:</b>&nbsp;Re: [OpenSIPS-Devel] [opensips] date format convert method that use in opensips.cfg (#378)</div></div></div><div><div class="FoxDiv20141104154518177111"><p>If zhouxiaoqiang only wants to get time string in GMT for SIP Date, it should be easy to implemented. C function gmtime should work. timezone configuration is not needed. A pvar say, gmttime(), should be enough.</p>
<p>If time strings in other timezones are needed, the best way may be to provider a function with a timezone parameter to get time string. The timezone parameter is better to use offset instead of using timezone name. The implementation may be a little tricky but also not difficult. A script variable should also work.</p>
<p>Regards,</p>
<p>Di-Shi</p>
<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br>Reply to this email directly or <a href="https://github.com/OpenSIPS/opensips/issues/378#issuecomment-61603566">view it on GitHub</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/AFOciZEGzsoPPw1brXn7kq7H_vOGMwAEks5nKHpNgaJpZM4C0MPh.gif" width="1"></p>
</div></div></blockquote>
</body></html>