@mikro-orm/mssql 6.2.10-dev.81 → 6.2.10-dev.83

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.
@@ -16,6 +16,7 @@ class MsSqlConnection extends knex_1.AbstractSqlConnection {
16
16
  options: {
17
17
  enableArithAbort: true,
18
18
  fallbackToDefaultDb: true,
19
+ useUTC: this.config.get('forceUtcTimezone'),
19
20
  },
20
21
  };
21
22
  /* istanbul ignore next */
package/MsSqlPlatform.js CHANGED
@@ -27,7 +27,7 @@ class MsSqlPlatform extends knex_1.AbstractSqlPlatform {
27
27
  if (typeof value === 'string') {
28
28
  return value;
29
29
  }
30
- return value.toISOString().substring(0, 10);
30
+ return tsqlstring_1.default.dateToString(value.toISOString(), this.timezone ?? 'local').substring(1, 11);
31
31
  }
32
32
  convertsJsonAutomatically() {
33
33
  return false;
@@ -160,13 +160,13 @@ class MsSqlPlatform extends knex_1.AbstractSqlPlatform {
160
160
  }
161
161
  /* istanbul ignore if */
162
162
  if (knex_1.Utils.isPlainObject(value) || value?.[knex_1.JsonProperty]) {
163
- return tsqlstring_1.default.escape(JSON.stringify(value), true, this.timezone);
163
+ return tsqlstring_1.default.escape(JSON.stringify(value), true, this.timezone ?? 'local');
164
164
  }
165
165
  if (value instanceof Buffer) {
166
166
  return `0x${value.toString('hex')}`;
167
167
  }
168
168
  if (value instanceof Date) {
169
- return tsqlstring_1.default.dateToString(value.toISOString(), 'Z');
169
+ return tsqlstring_1.default.dateToString(value.toISOString(), this.timezone ?? 'local');
170
170
  }
171
171
  return tsqlstring_1.default.escape(value);
172
172
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mikro-orm/mssql",
3
- "version": "6.2.10-dev.81",
3
+ "version": "6.2.10-dev.83",
4
4
  "description": "TypeScript ORM for Node.js based on Data Mapper, Unit of Work and Identity Map patterns. Supports MongoDB, MySQL, PostgreSQL and SQLite databases as well as usage with vanilla JavaScript.",
5
5
  "main": "index.js",
6
6
  "module": "index.mjs",
@@ -58,14 +58,14 @@
58
58
  "access": "public"
59
59
  },
60
60
  "dependencies": {
61
- "@mikro-orm/knex": "6.2.10-dev.81",
62
- "tedious": "18.2.1",
61
+ "@mikro-orm/knex": "6.2.10-dev.83",
62
+ "tedious": "18.2.3",
63
63
  "tsqlstring": "1.0.1"
64
64
  },
65
65
  "devDependencies": {
66
66
  "@mikro-orm/core": "^6.2.9"
67
67
  },
68
68
  "peerDependencies": {
69
- "@mikro-orm/core": "6.2.10-dev.81"
69
+ "@mikro-orm/core": "6.2.10-dev.83"
70
70
  }
71
71
  }