2 Replies Latest reply on Nov 12, 2013 8:04 AM by Tahir Zamir

    Milliseconds truncated when syncing

    Tahir Zamir



      I have a sql server database backend and when rhoconnect syncs data between this and a device I find that the datetime stamp values on the device all have their millisecond values truncated.


      The model on the device is a fixed schema model and the fields in question are defined as :datetime fields.  I have tried changing the definition of these fields to :string however this has made no difference.


      How can I prevent the millisecond values from being truncated when Rhoconnect syncs??



        • Re: Milliseconds truncated when syncing
          Kutir Mobility

          Hi Tahir,

          Can you share your time format?

          We tried to store time like "2013-11-12T18:14:43+0530" and  declared time_stamp as string in fixed schema model working fine.


          Visnupriya R

          Kutir Mobility

            • Re: Milliseconds truncated when syncing
              Tahir Zamir

              Hi Visnupriya,


              The time stored in sql server is stored as a datetime type and an example value is :-


                   2013-11-12 14:52:45.813


              The rails plugin model just has the following line in the associated class:-


                   attr_accessible :mydatetime, :field2, :field3 ....


              The corresponding model in the rhodes client app is defined as :-


              class MyClass

                include Rhom::FixedSchema

                enable :sync

                property :mydatetime , :datetime

                property :field2 , :string

                property :field3 , :string