|
791 | 791 | "key": id, |
792 | 792 | "count": 1, |
793 | 793 | "timestamp": ts || this.ts, |
794 | | - "hour": getRandomInt(0, 23), |
795 | | - "dow": getRandomInt(0, 6) |
| 794 | + "hour": new Date((ts || this.ts) * 1000).getHours(), |
| 795 | + "dow": new Date((ts || this.ts) * 1000).getDay() |
796 | 796 | }; |
797 | 797 |
|
798 | 798 | if (!id && eventTemplate && Object.keys(eventTemplate).length) { |
|
906 | 906 | "key": "[CLY]_star_rating", |
907 | 907 | "count": 1, |
908 | 908 | "timestamp": this.ts, |
909 | | - "hour": getRandomInt(0, 23), |
910 | | - "dow": getRandomInt(1, 6), |
| 909 | + "hour": new Date(this.ts * 1000).getHours(), |
| 910 | + "dow": new Date(this.ts * 1000).getDay(), |
911 | 911 | "test": 1, |
912 | 912 | }; |
913 | 913 |
|
|
929 | 929 | "key": "[CLY]_nps", |
930 | 930 | "count": 1, |
931 | 931 | "timestamp": this.ts, |
932 | | - "hour": getRandomInt(0, 23), |
933 | | - "dow": getRandomInt(1, 6), |
| 932 | + "hour": new Date(this.ts * 1000).getHours(), |
| 933 | + "dow": new Date(this.ts * 1000).getDay(), |
934 | 934 | "test": 1, |
935 | 935 | }; |
936 | 936 |
|
|
952 | 952 | "key": "[CLY]_survey", |
953 | 953 | "count": 1, |
954 | 954 | "timestamp": this.ts, |
955 | | - "hour": getRandomInt(0, 23), |
956 | | - "dow": getRandomInt(1, 6), |
| 955 | + "hour": new Date(this.ts * 1000).getHours(), |
| 956 | + "dow": new Date(this.ts * 1000).getDay(), |
957 | 957 | "test": 1, |
958 | 958 | }; |
959 | 959 |
|
|
1023 | 1023 | "key": "[CLY]_action", |
1024 | 1024 | "count": 1, |
1025 | 1025 | "timestamp": this.ts, |
1026 | | - "hour": getRandomInt(0, 23), |
1027 | | - "dow": getRandomInt(0, 6), |
| 1026 | + "hour": new Date(this.ts * 1000).getHours(), |
| 1027 | + "dow": new Date(this.ts * 1000).getDay(), |
1028 | 1028 | "test": 1 |
1029 | 1029 | }; |
1030 | 1030 | var selectedOffsets = [{x: 468, y: 366}, {x: 1132, y: 87}, {x: 551, y: 87}, {x: 647, y: 87}, {x: 1132, y: 87}]; |
|
1074 | 1074 | "key": "[CLY]_action", |
1075 | 1075 | "count": 1, |
1076 | 1076 | "timestamp": this.ts, |
1077 | | - "hour": getRandomInt(0, 23), |
1078 | | - "dow": getRandomInt(0, 6), |
| 1077 | + "hour": new Date(this.ts * 1000).getHours(), |
| 1078 | + "dow": new Date(this.ts * 1000).getDay(), |
1079 | 1079 | "test": 1 |
1080 | 1080 | }; |
1081 | 1081 | this.ts += 1000; |
|
0 commit comments