0
goldstar25 created
When I send data to the API by service-proxies.ts, I find that the parameters of the moment.Moment type are converted to ISO time when calling the toJSON method, resulting in inconsistent with my current time zone. Can I modify the toJSON method to modify the date formatting rules? E.g
data["subscribeTime"] = this.subscribeTime ? this.subscribeTime.format() : <any>undefined;
Now is :
data["releaseTime"] = this.releaseTime ? this.releaseTime.toISOString() : <any>undefined;
And the server is assigned local time,but clients get the iso time.... Time display is wrong ...
2 Answer(s)
-
0
I get NJsonSchema source code from github,and change DateTimeToStringCode is "format()".Build and cover related library. Currently, only this temporary solution is used.
-
0
Related github issue <a class="postlink" href="https://github.com/aspnetzero/aspnet-zero-core/issues/760">https://github.com/aspnetzero/aspnet-ze ... issues/760</a>