@riocrypto/common-server 1.0.1382 → 1.0.1383

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.
@@ -27,15 +27,11 @@ class InvopopClient {
27
27
  return __awaiter(this, void 0, void 0, function* () {
28
28
  const uuid = (0, uuid_1.v1)();
29
29
  const operationDate = new Date(order.createdAt);
30
- const operationYear = operationDate.getFullYear();
31
- const operationMonth = String(operationDate.getMonth() + 1).padStart(2, "0"); // Month is zero-indexed
32
- const operationDay = String(operationDate.getDate()).padStart(2, "0");
33
- const operationDateFormatted = `${operationYear}-${operationMonth}-${operationDay}`;
30
+ const operationDateOptions = { timeZone: "America/Mexico_City" };
31
+ const operationDateFormatted = operationDate.toLocaleString("en-US", operationDateOptions);
34
32
  const issueDate = new Date();
35
- const issueYear = issueDate.getFullYear();
36
- const issueMonth = String(issueDate.getMonth() + 1).padStart(2, "0"); // Month is zero-indexed
37
- const issueDay = String(issueDate.getDate()).padStart(2, "0");
38
- const issueDateFormatted = `${issueYear}-${issueMonth}-${issueDay}`;
33
+ const issueDateOptions = { timeZone: "America/Mexico_City" };
34
+ const issueDateFormatted = issueDate.toLocaleString("en-US", issueDateOptions);
39
35
  const { data } = yield axios_1.default.put(`${this.baseUrl}/transform/v1/jobs/${uuid}`, {
40
36
  workflow_id: "5b123900-1035-4c8c-a97a-36b940d7a21e",
41
37
  data: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@riocrypto/common-server",
3
- "version": "1.0.1382",
3
+ "version": "1.0.1383",
4
4
  "description": "",
5
5
  "main": "./build/index.js",
6
6
  "types": "./build/index.d.ts",