Cmdlets for OData

Build 25.0.9434

ServerTimeZone Parameter (Connect-OData Cmdlet)

The timezone for representing or interpreting the server's Edm.DateTime values. The value of this property affects how Edm.DateTime filters and results are converted between the server and the client.

Syntax

Connect-OData -ServerTimeZone string

Data Type

cstr

Default Value

""

Remarks

By default, Edm.DateTime values on the server are assumed to be in GMT. However, both time zone abbreviations and names are supported, with a recommendation to use the time zone name, such as America/New_York. The cmdlet will convert any filters derived from Edm.DateTime values from the machine's local time zone to the specified server time zone. Conversely, values returned by the OData server will be converted from the specified time zone to the local time zone of the machine before being presented in the result set.

When Edm.DateTime values are sent to the server, they are treated according to the time zone established by the ServerTimeZone. When the server returns Edm.DateTime values, it formats them based on the ServerTimeZone. This method ensures that Edm.DateTime values are consistently interpreted by both the client and the server.

Copyright (c) 2025 CData Software, Inc. - All rights reserved.
Build 25.0.9434