I want to pass datetime from client to server. I prefer to pass in ISO format using .toISOString() method. The challenge is while passing datetime(Javascript) to server, if I used C# DateTime then it tries to convert datetime in local datetime. So to get it as in UTC I am using DateTimeOffset. But by this I am not able to get exactly what was client's offset.
- In which format I should pass datetime to server so I can retain offset of client or should I pass it separately?
- suppose in input text I am selecting 2022-02-11(YYYY-MM-YY) Time - 10:00 AM, Now I want to pass same datetime to server, how I can?