Uploaded image for project: 'Couchbase .NET client library'
  1. Couchbase .NET client library
  2. NCBC-513

Use Timespan.TotalSeconds instead of Timespan.Seconds

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 1.3.7
    • 1.3.6
    • None
    • None

    Description

      The timespan calculation applied as part of the fix for issue NCBC-485 is incorrect.

      // NCBC-485 send small TTLs (less than 30 days) in seconds, not EPOCH.
      if(validFor < TimeSpan.FromSeconds(((60*60) * 24)*30))

      { return (uint)validFor.GetValueOrDefault().Seconds; }

      Note that this should be: return (uint)validFor.GetValueOrDefault().TotalSeconds;

      In most cases where a "round" Timespan is used, 0 will be returned as a result of using the "Second" property.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            jmorris Jeff Morris
            dplaskon Dan Plaskon
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty