You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, in the OSS library, a relative date-time matcher with an offset will use the system timezone to calculate the date-time to check against the request's actual value. This is problematic as the system timezone is arbitrary and non-deterministic from the perspective of the mock API’s configuration.
A fix for this would be to use the timezone of the request’s actual value, if provided. If the request’s actual value does not contain a timezone, maybe using a fixed timezone would be best (either provided by the user or just UTC).
There are other places in the date-time matcher code that use the system’s timezone, which could be fixed too.
More thought is required around whether this fix is feasible, as it could be a breaking change for existing users if they rely on the mock API using system timezone.
Reproduction steps
Create a relative date-time matcher with an offset and try and match
References
No response
The text was updated successfully, but these errors were encountered:
Proposal
Currently, in the OSS library, a relative date-time matcher with an offset will use the system timezone to calculate the date-time to check against the request's actual value. This is problematic as the system timezone is arbitrary and non-deterministic from the perspective of the mock API’s configuration.
A fix for this would be to use the timezone of the request’s actual value, if provided. If the request’s actual value does not contain a timezone, maybe using a fixed timezone would be best (either provided by the user or just UTC).
There are other places in the date-time matcher code that use the system’s timezone, which could be fixed too.
More thought is required around whether this fix is feasible, as it could be a breaking change for existing users if they rely on the mock API using system timezone.
Reproduction steps
Create a relative date-time matcher with an offset and try and match
References
No response
The text was updated successfully, but these errors were encountered: