You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Dec 24, 2022. It is now read-only.
Which if you're using the [servicestack-client](https://docs.servicestack.net/servicestack-client-umd) npm package can be resolved with:
372
+
373
+
```ts
374
+
import { todate } from"servicestack-client";
375
+
var date =todate(wcfDateString);
376
+
```
377
+
378
+
Or if using [ss-utils.js](https://docs.servicestack.net/ss-utils-js) that's built into ServiceStack:
379
+
380
+
```js
381
+
var date =$.ss.todate(wcfDateString);
382
+
```
383
+
384
+
If you change ServiceStack.Text default serialization of Date to either use the ISO8601 date format:
385
+
386
+
```csharp
387
+
JsConfig.DateHandler=DateHandler.ISO8601;
388
+
```
389
+
390
+
It can be parsed natively with:
391
+
392
+
```js
393
+
newDate(dateString)
394
+
```
395
+
396
+
Likewise when configured to return:
397
+
398
+
```csharp
399
+
JsConfig.DateHandler=DateHandler.UnixTimeMs;
400
+
```
401
+
402
+
It can also be converted natively with:
403
+
404
+
```js
405
+
newDate(unixTimeMs)
406
+
```
407
+
361
408
## Global Default JSON Configuration
362
409
363
410
The JSON/JSV and CSV serialization can be customized globally by configuring the `JsConfig` or type-specific `JsConfig<T>` static classes with your preferred defaults. Global static configuration can be configured once on **Startup** using `JsConfig.Init()`, e.g:
0 commit comments