test-entity-library-asm 3.9.21 → 3.9.23

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.
package/dist/index.js CHANGED
@@ -38,7 +38,7 @@ function createDataBaseSource() {
38
38
  password: process.env.DB_PASSWORD ?? "",
39
39
  database: process.env.DB_DATABASE,
40
40
  synchronize: process.env.DB_SYNCHRONIZE === "true",
41
- timezone: "Z",
41
+ // timezone: "Z", // Configura la zona horaria a UTC
42
42
  entities: [
43
43
  __dirname +
44
44
  `/entities${process.env.DB_ENTITIES_ROUTE
@@ -5,13 +5,12 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.DateTransformer = void 0;
7
7
  const moment_timezone_1 = __importDefault(require("moment-timezone"));
8
- const __1 = require("..");
9
8
  class DateTransformer {
10
9
  to(value) {
11
- return (0, moment_timezone_1.default)(value).utc().format("YYYY-MM-DD HH:mm:ss");
10
+ return (0, moment_timezone_1.default)(value).format("YYYY-MM-DD HH:mm:ss");
12
11
  }
13
12
  from(value) {
14
- return moment_timezone_1.default.utc(value).tz((0, __1.getTimeZone)()).toDate();
13
+ return new Date(value + "Z");
15
14
  }
16
15
  }
17
16
  exports.DateTransformer = DateTransformer;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "test-entity-library-asm",
3
- "version": "3.9.21",
3
+ "version": "3.9.23",
4
4
  "description": "Entidades de ejemplo para una base de datos",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
package/src/index.ts CHANGED
@@ -26,7 +26,7 @@ export function createDataBaseSource(): DataSource {
26
26
  password: process.env.DB_PASSWORD ?? "",
27
27
  database: process.env.DB_DATABASE,
28
28
  synchronize: process.env.DB_SYNCHRONIZE === "true",
29
- timezone: "Z",
29
+ // timezone: "Z", // Configura la zona horaria a UTC
30
30
  entities: [
31
31
  __dirname +
32
32
  `/entities${
@@ -4,10 +4,10 @@ import { getTimeZone } from "..";
4
4
 
5
5
  export class DateTransformer implements ValueTransformer {
6
6
  to(value: Date) {
7
- return moment(value).utc().format("YYYY-MM-DD HH:mm:ss");
7
+ return moment(value).format("YYYY-MM-DD HH:mm:ss");
8
8
  }
9
9
 
10
10
  from(value: string) {
11
- return moment.utc(value).tz(getTimeZone()).toDate();
11
+ return new Date(value + "Z");
12
12
  }
13
13
  }