This is the API response
{
"session_start_time": "09:05:00",
"session_end_time": "15:18:00"
}
These hours are based on UTC +0 time zone and I need to convert them to user timezone and show user.
How can I do that?
This is the API response
{
"session_start_time": "09:05:00",
"session_end_time": "15:18:00"
}
These hours are based on UTC +0 time zone and I need to convert them to user timezone and show user.
How can I do that?
2
Answers
After days of searching, I found this answer Link
And find the write solution with this func:
At first create a struct for your response like:
Then decode your json to SessionData and go with following lines: