-
Notifications
You must be signed in to change notification settings - Fork 62
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
toTimestamp client-side function #105
base: main
Are you sure you want to change the base?
Conversation
vocabularies/UI.xml
Outdated
<Function Name="toTimestamp"> | ||
<Annotation Term="Core.Description" String="Representation of the given point in time as an `Edm.DateTimeOffset` whose [timezone fragment](https://www.w3.org/TR/xmlschema11-2/#nt-tzFrag) is `Z`" /> | ||
<Parameter Name="Date" Type="Edm.Date"/> | ||
<Parameter Name="TimeOfDay" Type="Edm.TimeOfDay"/> | ||
<Parameter Name="Timezone" Type="Edm.String"> | ||
<Annotation Term="Core.Description" String="Time zone according to the [IANA](https://www.iana.org/time-zones) standard" /> | ||
<Annotation Term="Core.LongDescription" String="If absent, the time zone of the UI (Fiori Launchpad) is implied" /> | ||
</Parameter> | ||
<ReturnType Type="Edm.DateTimeOffset"/> | ||
</Function> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This defines a server-side function.
We should discuss in the OData TC whether this is also the way to go for defining client-side functions, and how to mark these functions as "client-side".
Could you please open a TC jira issue?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
…it into toTimestamp
into toTimestamp Conflicts: vocabularies/UI.md
Conflicts: vocabularies/Common.json vocabularies/Common.md vocabularies/Common.xml vocabularies/UI.json vocabularies/UI.xml
Prerequisites:
The client can delegate execution of the function to the server with
or
The latter, however, makes sense only if the OData server knows the annotation definition. But then it could as well expose a Timestamp property. The whole point of annotations is that they can be contributed by a party different from the OData server. However, that party might serve as a proxy between client and server that converts the second GET request into the first.