0

I'm testing my app using SpringDoc OpenApi v3, after a request I'm getting a response with headers of GMT dateTime. I need it as UTC+3 zone. For example, the request was sent at 11:02:58, but in the picture you can see and actual header. How can I fix it? enter image description here

Maksym Rybalkin
  • 453
  • 1
  • 8
  • 22
  • 1
    Related (or duplicate): [By using HTTP request how to get server's timezone not in UTC format](https://stackoverflow.com/q/42296659/113116) – Helen Oct 07 '21 at 10:27

1 Answers1

2

Dates in HTTP headers are always expressed in GMT. See RFC 7231 section 7.1.1 and MDN article on the Date header format.

If the client needs that value as local time, the client needs to convert from UTC to local time themselves. For example, if you are developing a client application, you can use a date/time library to display timestamps in the user's local time.

Helen
  • 87,344
  • 17
  • 243
  • 314