majorimi / blazor-components

Components collection and extensions for Blazor applications.
MIT License
327 stars 59 forks source link

Notification Timestamp options not work propery #121

Open cupsos opened 1 year ago

cupsos commented 1 year ago

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