tomasmcguinness / dotnet-passbook

A .Net Library for generating Apple Passbook (Wallet) files for iOS. Please get involved by creating pull requests and opening issues!
MIT License
319 stars 117 forks source link

Expire date is not setting #185

Closed luisvoliveira closed 1 year ago

luisvoliveira commented 1 year ago

Hi @tomasmcguinness , I am trying to use the expire date but everytime I try is not setting the date.

this is the line I use: //set expire date pass.ExpirationDate = new DateTimeOffset(ssPassData.ssSTPass.ssExpiration.ssSTExpiration.ssExpirationDate);

the datetime variable is in this format: 10/5/2023 12:00:00 AM +00:00

I was reading this https://developer.apple.com/library/archive/documentation/UserExperience/Reference/PassKit_Bundle/Chapters/TopLevel.html#//apple_ref/doc/uid/TP40012026-CH2-SW2 and it says that should be a string. Should this type be a string or only datetime?

how can I set a expire date, is it a bug or I am doing something wrong?

luisvoliveira commented 1 year ago

you can close, found out the problem. It was the relevantDate.