ExipirationDate in PushChannel is incorrect #3330
Labels
area-Notifications
Toast notification, badges, Live Tiles, push notifications
bug
Something isn't working
Describe the bug
var pushChannelCreateResult = await PushNotificationManager.Default.CreateChannelAsync
The request is succeeding and I’ve verified that I can send a push notification to the app with the returned URI, but the expiration time is coming back in a very weird fashion (or perhaps I don’t understand how the field is meant to be interpreted).
I’ve pasted the values from the debugger here.
◢ pushChannelCreateResult.Channel.ExpirationTime {1/1/1601 1:38:08 AM -05:00} System.DateTimeOffset
▶ ClockDateTime {1/1/1601 1:38:08 AM} System.DateTime
▶ Date {1/1/1601 12:00:00 AM} System.DateTime
▶ DateTime {1/1/1601 1:38:08 AM} System.DateTime
Day 1 int
DayOfWeek Monday System.DayOfWeek
DayOfYear 1 int
Hour 1 int
▶ LocalDateTime {1/1/1601 1:38:08 AM} System.DateTime
Millisecond 553 int
Minute 38 int
Month 1 int
▶ Offset {-05:00:00} System.TimeSpan
Second 8 int
Ticks 504911290885532024 long
▶ TimeOfDay {01:38:08.5532024} System.TimeSpan
▶ UtcDateTime {1/1/1601 6:38:08 AM} System.DateTime
UtcTicks 504911470885532024 long
Year 1601 int
▶ _dateTime {1/1/1601 6:38:08 AM} System.DateTime
_offsetMinutes -300 short
Steps to reproduce the bug
Register an Azure Application
Using WinAppSDK (latest version) to create an app that calls:
PushNotificationManager.Default.CreateChannelAsync
Expected behavior
No response
Screenshots
No response
NuGet package version
Windows App SDK 1.2.2: 1.2.221209.1
Packaging type
Packaged (MSIX)
Windows version
Windows 11 version 22H2 (22621, 2022 Update)
IDE
Visual Studio 2022
Additional context
No response
The text was updated successfully, but these errors were encountered: