I have a resource with a datetime field say ‘expiry’. This ‘expiry’ field should be updated from server with ‘x’ hours added to it when client request a PATCH. In JSONAPI, client cannot send datetime as PATCH data for updating due to timezone issues.
I am having a thought of implementing one of the below ways,
- Making a virtual boolean field [sending as resource property like ‘expiry_active’] for ‘expiry’ field. Now client can send this virtual boolean field as PATCH data so that i can update the ‘expiry’ datetime field as sideeffect.
- I can send the same boolean data in META data. In this case, is there any possibility to send the meta data alone as PATCH from client so that i can update the datetime field as sideeffect?.
Is there any other way to address the above scenario?