✅ Set TimeZone for request duration in ASP.NET Core
Hey,
I am generating PDFs on the server with
DateTime
objects. The problem is that my clients come from several different time zones and want the PDF to be generated in their own time zone.
Question:
How do I convert the DateTime
object to a string using the time zone of the client?
Should I just send the browsers time zone as query parameter or are there better approaches?6 Replies
That information isn't available in the http request by default, so your client will need to send it to the backend
Yea that makes sense but what is the best way to send it?
query string, header, body?
doesnt matter
Some custom
x-something
header, IMHOAlr thx
Was this issue resolved? If so, run
/close
- otherwise I will mark this as stale and this post will be archived until there is new activity.