@saihu/common 1.1.16 → 1.1.17

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- {"version":3,"file":"times.d.ts","sourceRoot":"","sources":["../../src/util/times.ts"],"names":[],"mappings":"AAQA,wBAAgB,cAAc,WAE7B;AAED,wBAAgB,eAAe,WAE9B;AAED,wBAAgB,mBAAmB,SAElC;AAED,wBAAgB,qBAAqB,CAAC,aAAa,EAAE,MAAM,GAAG,MAAM,CAEnE;AAED,wBAAgB,8BAA8B,CAC5C,aAAa,EAAE,MAAM,EACrB,MAAM,GAAE,MAA8B,GACrC,MAAM,CAER"}
1
+ {"version":3,"file":"times.d.ts","sourceRoot":"","sources":["../../src/util/times.ts"],"names":[],"mappings":"AAQA,wBAAgB,cAAc,WAE7B;AAED,wBAAgB,eAAe,WAE9B;AAED,wBAAgB,mBAAmB,SAMlC;AAED,wBAAgB,qBAAqB,CAAC,aAAa,EAAE,MAAM,GAAG,MAAM,CAEnE;AAED,wBAAgB,8BAA8B,CAC5C,aAAa,EAAE,MAAM,EACrB,MAAM,GAAE,MAA8B,GACrC,MAAM,CAER"}
@@ -21,7 +21,10 @@ function getTomorrowDate() {
21
21
  return (0, dayjs_1.default)().add(1, 'day').format('YYYY-MM-DD');
22
22
  }
23
23
  function getCurrentChinaTime() {
24
- return (0, dayjs_1.default)().tz('Asia/Shanghai').toDate();
24
+ const chinaTime = (0, dayjs_1.default)().tz('Asia/Shanghai');
25
+ const chinaDateString = chinaTime.format('YYYY-MM-DD HH:mm:ss.SSS');
26
+ const chinaDate = new Date(chinaDateString + 'Z');
27
+ return chinaDate;
25
28
  }
26
29
  function convertUtcToChinaTime(utcTimeString) {
27
30
  return dayjs_1.default.utc(utcTimeString).tz('Asia/Shanghai').format();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@saihu/common",
3
- "version": "1.1.16",
3
+ "version": "1.1.17",
4
4
  "description": "Common utilities for NestJS applications",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",