blazor-components icon indicating copy to clipboard operation
blazor-components copied to clipboard

Notification Timestamp options not work propery

Open cupsos opened this issue 1 year ago • 0 comments

Bug

Windows notification timestamp is always January 1. (probably 1970-01-01)

notification-tiemstamp

Environment

Windows 11 22H2 Microsoft Edge 108.0.1462.54

Bug reason

HTML5 Notification.timestamp is number format.

From Spec

A notification has an associated timestamp which is an EpochTimeStamp representing the time.

From MDN

A number representing a timestamp, given as Unix time in milliseconds.

But this library pass timestamp as string format. ISO 8601

https://github.com/majorimi/blazor-components/blob/879e4255368cc65c38f84bf2acf1a934243d55dd/src/Majorsoft.Blazor.Components.Notifications/HTML5/HtmlNotificationData.cs#L74

https://github.com/majorimi/blazor-components/blob/879e4255368cc65c38f84bf2acf1a934243d55dd/src/Majorsoft.Blazor.Components.Notifications/HTML5/HtmlNotificationService.cs#L61-L77

https://github.com/majorimi/blazor-components/blob/879e4255368cc65c38f84bf2acf1a934243d55dd/src/Majorsoft.Blazor.Components.Notifications/wwwroot/notification.js#L37-L53

cupsos avatar Dec 22 '22 01:12 cupsos