Skip to content

Commit 96eeac0

Browse files
Copilotstnguyen90
andauthored
Update support hours to 4:00 AM – 5:00 PM UTC (#2912)
* Initial plan * Update support hours to 3:30AM to 12AM UTC Co-authored-by: stnguyen90 <1477010+stnguyen90@users.noreply.github.com> * Update support hours to 04:00–17:00 UTC Co-authored-by: stnguyen90 <1477010+stnguyen90@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: stnguyen90 <1477010+stnguyen90@users.noreply.github.com>
1 parent 8d62d1b commit 96eeac0

4 files changed

Lines changed: 35 additions & 31 deletions

File tree

β€Žsrc/lib/components/support.svelteβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
3131
$: upgradeURL = `${base}/organization-${freeOrganization?.$id}/change-plan`;
3232
33-
$: supportTimings = `${utcHourToLocaleHour('16:00')} - ${utcHourToLocaleHour('00:00')} ${localeShortTimezoneName()}`;
33+
$: supportTimings = `${utcHourToLocaleHour('04:00')} - ${utcHourToLocaleHour('17:00')} ${localeShortTimezoneName()}`;
3434
3535
type SupportOption = {
3636
cta?: string;

β€Žsrc/routes/(console)/supportWizard.svelteβ€Ž

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -195,8 +195,8 @@
195195
}
196196
197197
const workTimings = {
198-
start: '16:00',
199-
end: '00:00',
198+
start: '04:00',
199+
end: '17:00',
200200
startDay: 'Monday' as WeekDay,
201201
endDay: 'Friday' as WeekDay
202202
};

β€Žsrc/routes/(console)/wizard/support/store.test.tsβ€Ž

Lines changed: 30 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -16,35 +16,35 @@ describe('isSupportOnline', () => {
1616
};
1717

1818
describe('weekday support hours (Monday-Friday)', () => {
19-
it('should be online at 16:00 UTC (Monday)', () => {
20-
mockDate(16, 1); // Monday, 16:00 UTC
19+
it('should be online at 04:00 UTC (Monday)', () => {
20+
mockDate(4, 1); // Monday, 04:00 UTC
2121
expect(isSupportOnline()).toBe(true);
2222
});
2323

24-
it('should be online at 20:00 UTC (Tuesday)', () => {
25-
mockDate(20, 2); // Tuesday, 20:00 UTC
24+
it('should be online at 10:00 UTC (Tuesday)', () => {
25+
mockDate(10, 2); // Tuesday, 10:00 UTC
2626
expect(isSupportOnline()).toBe(true);
2727
});
2828

29-
it('should be online at 23:59 UTC (Wednesday)', () => {
30-
mockDate(23, 3); // Wednesday, 23:59 UTC
29+
it('should be online at 16:59 UTC (Wednesday)', () => {
30+
mockDate(16, 3); // Wednesday, 16:59 UTC
3131
expect(isSupportOnline()).toBe(true);
3232
});
3333

34-
it('should be online at 23:00 UTC (Thursday)', () => {
35-
mockDate(23, 4); // Thursday, 23:00 UTC
34+
it('should be online at 12:00 UTC (Thursday)', () => {
35+
mockDate(12, 4); // Thursday, 12:00 UTC
3636
expect(isSupportOnline()).toBe(true);
3737
});
3838

39-
it('should be online at 22:00 UTC (Friday)', () => {
40-
mockDate(22, 5); // Friday, 22:00 UTC
39+
it('should be online at 08:00 UTC (Friday)', () => {
40+
mockDate(8, 5); // Friday, 08:00 UTC
4141
expect(isSupportOnline()).toBe(true);
4242
});
4343
});
4444

4545
describe('outside support hours on weekdays', () => {
46-
it('should be offline at 15:59 UTC (Monday)', () => {
47-
mockDate(15, 1); // Monday, 15:59 UTC
46+
it('should be offline at 03:59 UTC (Monday)', () => {
47+
mockDate(3, 1); // Monday, 03:59 UTC
4848
expect(isSupportOnline()).toBe(false);
4949
});
5050

@@ -53,20 +53,20 @@ describe('isSupportOnline', () => {
5353
expect(isSupportOnline()).toBe(false);
5454
});
5555

56-
it('should be offline at 10:00 UTC (Wednesday)', () => {
57-
mockDate(10, 3); // Wednesday, 10:00 UTC
56+
it('should be offline at 17:00 UTC (Wednesday)', () => {
57+
mockDate(17, 3); // Wednesday, 17:00 UTC
5858
expect(isSupportOnline()).toBe(false);
5959
});
6060

61-
it('should be offline at 14:00 UTC (Friday)', () => {
62-
mockDate(14, 5); // Friday, 14:00 UTC
61+
it('should be offline at 23:00 UTC (Friday)', () => {
62+
mockDate(23, 5); // Friday, 23:00 UTC
6363
expect(isSupportOnline()).toBe(false);
6464
});
6565
});
6666

6767
describe('weekends', () => {
6868
it('should be offline on Saturday regardless of hour', () => {
69-
mockDate(18, 6); // Saturday, 18:00 UTC (in support hours for weekdays)
69+
mockDate(10, 6); // Saturday, 10:00 UTC (in support hours for weekdays)
7070
expect(isSupportOnline()).toBe(false);
7171
});
7272

@@ -80,25 +80,30 @@ describe('isSupportOnline', () => {
8080
expect(isSupportOnline()).toBe(false);
8181
});
8282

83-
it('should be offline on Sunday at 16:00', () => {
84-
mockDate(16, 0); // Sunday, 16:00 UTC
83+
it('should be offline on Sunday at 10:00', () => {
84+
mockDate(10, 0); // Sunday, 10:00 UTC
8585
expect(isSupportOnline()).toBe(false);
8686
});
8787
});
8888

8989
describe('edge cases', () => {
90-
it('should handle boundary at 15:59 (just before support hours)', () => {
91-
mockDate(15, 1); // Monday, 15:59 UTC
90+
it('should handle boundary at 03:59 (just before support hours)', () => {
91+
mockDate(3, 1); // Monday, 03:59 UTC
9292
expect(isSupportOnline()).toBe(false);
9393
});
9494

95-
it('should handle boundary at 16:00 (start of support hours)', () => {
96-
mockDate(16, 1); // Monday, 16:00 UTC
95+
it('should handle boundary at 04:00 (start of support hours)', () => {
96+
mockDate(4, 1); // Monday, 04:00 UTC
9797
expect(isSupportOnline()).toBe(true);
9898
});
9999

100-
it('should handle late night hours on Friday', () => {
101-
mockDate(23, 5); // Friday, 23:00 UTC
100+
it('should handle boundary at 17:00 (end of support hours)', () => {
101+
mockDate(17, 1); // Monday, 17:00 UTC
102+
expect(isSupportOnline()).toBe(false);
103+
});
104+
105+
it('should handle boundary at 16:59 (just before end of support hours)', () => {
106+
mockDate(16, 5); // Friday, 16:59 UTC
102107
expect(isSupportOnline()).toBe(true);
103108
});
104109
});

β€Žsrc/routes/(console)/wizard/support/store.tsβ€Ž

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,8 @@ export function isSupportOnline() {
2828
return false;
2929
}
3030

31-
// Support hours are 16:00 UTC to 23:59 UTC on weekdays
32-
// This roughly covers 09:00 PT to 17:00 PT (depending on PST/PDT)
33-
if (hour >= 16) {
31+
// Support hours are 04:00 UTC to 17:00 UTC on weekdays
32+
if (hour >= 4 && hour < 17) {
3433
return true;
3534
}
3635

0 commit comments

Comments
Β (0)