The following formats: GeoJson, GML 3.1 and GML 3.2 have the correct default behavior, i.e. they take into account the timezone when encoding a date \ time attribute.
The following formats: text/html, text/plain, text/xml and application/vnd.ogc.gml (GML2), don't have any special treatment for date \ times and simply do a to string regardless of the timezone or time format.
For example the text/plain output format time encoding:
It should also be possible to control if GeoServer will or will not take into account the the time zone when encoding date \ time attributes using this Java property:
Formats GeoJson, GML 3.1 and GML 3.2 have the correct default behavior are taking into account this flag.
To reproduce this issue just perform a WMS GetFeatureInfo in a layer with a time attribute. Formats GeoJson, GML 3.1 and GML 3.2 will encode the time values with the proper time zone information but the other formats will just to a simple to srng.