@riocrypto/common 1.0.1190 → 1.0.1192
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.
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const convertToCDMXDate: (date: Date) => Date;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.convertToCDMXDate = void 0;
|
|
4
|
+
const convertToCDMXDate = (date) => {
|
|
5
|
+
const mexicoCityTimeZone = "America/Mexico_City";
|
|
6
|
+
const mexicoCityTime = date.toLocaleString("en-US", {
|
|
7
|
+
timeZone: mexicoCityTimeZone,
|
|
8
|
+
});
|
|
9
|
+
const mexicoCityDate = new Date(mexicoCityTime);
|
|
10
|
+
return mexicoCityDate;
|
|
11
|
+
};
|
|
12
|
+
exports.convertToCDMXDate = convertToCDMXDate;
|
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.getCurrentMexicoCityDate = void 0;
|
|
4
4
|
const getCurrentMexicoCityDate = () => {
|
|
5
5
|
const mexicoCityTimeZone = "America/Mexico_City";
|
|
6
|
-
const mexicoCityTime =
|
|
6
|
+
const mexicoCityTime = new Date().toLocaleString("en-US", {
|
|
7
7
|
timeZone: mexicoCityTimeZone,
|
|
8
8
|
});
|
|
9
9
|
const mexicoCityDate = new Date(mexicoCityTime);
|