<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <div class="moz-cite-prefix">Hello,<br>
      <br>
      Indeed, date fields where not properly supported in the
      cachedb_mongodb module.<br>
      I've just committed a fix for this - so please update your GIT
      sources to the latest ones.<br>
      <br>
      I've just tested this with a small script like :<br>
      <br>
      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (!save("location"))<br>
      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; sl_reply_error();<br>
      <br>
      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; sleep("1");<br>
      <br>
      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; cache_raw_query("mongodb:instance1","{ \"op\" :
      \"find\", \"ns\" : \"location.location\", \"query\": {\"username\"
      : \"vlad\"} }","$avp(mongo_result)");&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>
      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $json(json_res) := $avp(mongo_result);<br>
      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $avp(expiration) = $json(json_res/expires)-$Ts;<br>
      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $avp(last_edited) =
      $Ts-$json(json_res/last_modified);<br>
      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; xlog("Username vlad will expired in
      $avp(expiration) seconds and was edited $avp(last_edited) seconds
      ago \n"); <br>
      <br>
      Best Regards,<br>
      <pre class="moz-signature" cols="72">Vlad Paiu
OpenSIPS Developer
<a class="moz-txt-link-freetext" href="http://www.opensips-solutions.com">http://www.opensips-solutions.com</a> </pre>
      On 10.02.2015 04:26, sevpal wrote:<br>
    </div>
    <blockquote cite="mid:D22FB6FA163E4592B9FCCA458675D05E@LenovoPC"
      type="cite">
      <meta content="text/html; charset=ISO-8859-1"
        http-equiv="Content-Type">
      <div dir="ltr">
        <div style="FONT-SIZE: 12pt; FONT-FAMILY: 'Calibri'; COLOR:
          #000000">
          <div>The data in the DB are stored correctly, there aren&#8217;t any
            problems there, I can view all the fields properly set with
            &#8220;db.location.find()&#8221; . On a raw Query though, all the other
            fields return with Json data except the date/time fields. It
            seems mongo needs a different kind of directive than what is
            currently in the module to retrieve the data.</div>
          <div style="FONT-SIZE: small; FONT-FAMILY: 'Calibri';
            FONT-WEIGHT: normal; COLOR: #000000; FONT-STYLE: normal;
            TEXT-DECORATION: none; DISPLAY: inline">
            <div style="FONT: 10pt tahoma">
              <div>&nbsp;</div>
              <div style="BACKGROUND: #f5f5f5">
                <div style="font-color: black"><b>From:</b> <a
                    moz-do-not-send="true" title="bogdan@opensips.org"
                    href="mailto:bogdan@opensips.org">Bogdan-Andrei
                    Iancu</a> </div>
                <div><b>Sent:</b> Monday, February 09, 2015 4:24 AM</div>
                <div><b>To:</b> <a moz-do-not-send="true"
                    title="sevpal@aol.com" href="mailto:sevpal@aol.com">sevpal</a>
                  ; <a moz-do-not-send="true"
                    title="users@lists.opensips.org"
                    href="mailto:users@lists.opensips.org">OpenSIPS
                    users mailling list</a> </div>
                <div><b>Subject:</b> Re: [OpenSIPS-Users] Last Modified
                  AOR for User</div>
              </div>
            </div>
            <div>&nbsp;</div>
          </div>
          <div style="FONT-SIZE: small; FONT-FAMILY: 'Calibri';
            FONT-WEIGHT: normal; COLOR: #000000; FONT-STYLE: normal;
            TEXT-DECORATION: none; DISPLAY: inline">
            <div class="moz-cite-prefix"><tt>Hi Jalung,<br>
                <br>
                If you list the records in mongoDB collection, do you
                see the "last_modified" field properly set ? (I'm trying
                to understand if you have a problem with the data in DB
                or with the query itself)<br>
                <br>
                Regards,<br>
              </tt>
              <pre class="moz-signature" cols="72">Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
<a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://www.opensips-solutions.com">http://www.opensips-solutions.com</a></pre>
              On 07.02.2015 01:47, sevpal wrote:<br>
            </div>
            <blockquote
              cite="mid:1F168A0E50D944B38A363F687AD6A7E6@LenovoPC"
              type="cite">
              <div dir="ltr">
                <div style="FONT-SIZE: 12pt; FONT-FAMILY: 'Calibri';
                  COLOR: #000000">
                  <div>If I&#8217;m storing the location table in a mongodb
                    collection, how to query the most current AOR for a
                    user? I can query all the fields except the
                    date/time fields eg; &#8220;last_modified&#8221;, they return
                    empty. I&#8217;m doing this using the mongo raw&nbsp; query in
                    Opensips.</div>
                  <div>&nbsp;</div>
                  <div>Jalung </div>
                </div>
              </div>
              <br>
              <fieldset class="mimeAttachmentHeader"></fieldset>
              <br>
              <pre wrap="">_______________________________________________
Users mailing list
<a moz-do-not-send="true" class="moz-txt-link-abbreviated" href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a>
<a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a>
</pre>
            </blockquote>
            <br>
          </div>
        </div>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
Users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a>
<a class="moz-txt-link-freetext" href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a>
</pre>
    </blockquote>
    <br>
  </body>
</html>