我有一个客户端具有日期类型属性的对象.当我尝试将对象发送HttpClient.post到服务器时,属性的值将更改为UTC时区.
客户端值为2017年11月26日星期日00:00:00 GMT + 0300(土耳其标准时间),但当它进入服务器时,更改为:25.11.2017 21:00:00
我该怎么控制呢?
这是我的班级.
export interface IBill {
BillID : number;
SubscriptionID:number;
SiteID : number;
SubscriptionName: string;
Amount: number;
Date: Date;
PaymentDeadline: Date;
Virtual: boolean;
Portioned: boolean;
Issuanced: boolean;
FinancialTransactionComment : string;}
Run Code Online (Sandbox Code Playgroud)
我在填写ng-form时创建了一个对象,然后调用Http.post:
let bill = this.formData;
this.http.post(this.configuration.ServerWithApiUrl + url, bill , { headers: headers, withCredentials: true, observe: "response", responseType: 'text' })
.map((response) => {
return this.parseResponse(response);
}).catch(
(err) =>
this.handleError(err));
Run Code Online (Sandbox Code Playgroud)