I'm implementing an AppIntent of my macOS app (not iOS). It has a non-optional Date parameter like so:
@Parameter(
title: LocalizedStringResource("AppIntent.parameter.date"),
requestValueDialog: IntentDialog(LocalizedStringResource("AppIntent.parameter.date.requestValue"))
)
var date: Date
...
static var parameterSummary: some ParameterSummary {
Summary("Remind me about \(\.$title) at \(\.$date)")
}
In the Shortcuts app it shows up fine and everything works if I actually enter a date in the summary.
If the parameter is empty when running the intent, the "requestValue" dialog pops up asking for a date with a date picker. However, the returned date is always 7 hours in the future. E.g. I enter a date with 11:00am, then it would return the same date but with 6:00pm. Am I doing something wrong or is this a bug in Shortcuts?