forked from github/plane
[WEB-761] fix: Time zone date misalignment (#3986)
* fix date time misalignment * fix failing build * fix gantt chart view position fix * comments for getDate method * remove new Date() where not required * changes from my self review
This commit is contained in:
@@ -119,7 +119,7 @@ export const NotificationCard: React.FC<NotificationCardProps> = (props) => {
|
||||
const notificationField = notification.data.issue_activity.field;
|
||||
const notificationTriggeredBy = notification.triggered_by_details;
|
||||
|
||||
if (isSnoozedTabOpen && new Date(notification.snoozed_till!) < new Date()) return null;
|
||||
if (isSnoozedTabOpen && notification.snoozed_till! < new Date()) return null;
|
||||
|
||||
return (
|
||||
<Link
|
||||
|
||||
@@ -60,7 +60,7 @@ export const SnoozeNotificationModal: FC<SnoozeModalProps> = (props) => {
|
||||
|
||||
if (!formDataDate) return timeStamps;
|
||||
|
||||
const isToday = today.toDateString() === new Date(formDataDate).toDateString();
|
||||
const isToday = today.toDateString() === formDataDate.toDateString();
|
||||
|
||||
if (!isToday) return timeStamps;
|
||||
|
||||
@@ -93,7 +93,7 @@ export const SnoozeNotificationModal: FC<SnoozeModalProps> = (props) => {
|
||||
);
|
||||
const minutes = parseInt(time[1]);
|
||||
|
||||
const dateTime = new Date(formData.date);
|
||||
const dateTime = formData.date;
|
||||
dateTime.setHours(hours);
|
||||
dateTime.setMinutes(minutes);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user