launchdarkly / ruby-server-sdk

LaunchDarkly Server-side SDK for Ruby
https://docs.launchdarkly.com/sdk/server-side/ruby
Other
33 stars 50 forks source link

Ruby SDK evaluates date conditions as false #220

Closed zbycz closed 1 year ago

zbycz commented 1 year ago

Describe the bug If i create a date condition such as this in LD UI, this library always evaluates it as false. (We also use React JS client which works fine.)

Example of UI:

Screenshot 2023-06-02 at 15 00 04

To reproduce

  1. create a new flag with date condition on attribute. It should evaluate to true (ie. past date)
  2. ask for this condition in Ruby code
  3. observe false

SDK version 7.2.0

Language version, developer tools ruby 3.2.0

keelerm84 commented 1 year ago

My apologies for the error, and thank you for reporting this. I will update you once I have a resolution for you.

Tracking internally as sc-205433.

keelerm84 commented 1 year ago

@zbycz some quick internal testing seems to indicate this is working as expected.

Can you please show me the context you are trying to evaluate? Are you providing the date in the context in RFC 3339 format or as milliseconds?

Are there additional rules on that flag configuration, or is it solely targeting on that date?

zbycz commented 1 year ago

Hi, after all, it was issue on our side. We really provided the date in Ruby-date instead of miliseconds. Thanks for you help. 👍