DateTimeSchema Enumeration | |
Represents a group of enums that will format any DateTime[Schema] response property based on its type
Namespace: AppOne.Services.V2Assembly: AppOne.Web.Service (in AppOne.Web.Service.dll) Version: 1.0.141
Syntax public enum DateTimeSchema
AppOne.Services.V2.DateTimeSchema = function();
AppOne.Services.V2.DateTimeSchema.createEnum('AppOne.Services.V2.DateTimeSchema', false);
Members Member name | Value | Description |
---|
ISO8601Sort | 0 |
The pattern reflects a defined standard ISO 8601 format as "yyyy'-'MM'-'dd'T'HH':'mm':'ss". This format is sortable, hence the 'Sort' post fix portion of the name.
This enum type will produce result strings that sort consistently in ascending or descending order based on date and time values.
If a contract allows an input for setting a DateTimeSchema property and none is provided, then this enum will be the default format used.
|
ISO8601 | 1 |
The pattern reflects a defined standard ISO 8601 and is the same, regardless of the culture used. This format corresponds to
the "yyyy'-'MM'-'dd'T'HH':'mm':'ss'.'fffffffK" custom format and to the "yyyy'-'MM'-'dd'T'HH':'mm':'ss'.'fffffffzzz" custom format string for
DateTimeOffset values. In this string, the pairs of single quotation marks that delimit individual characters, such as the hyphens, the colons, and
the letter "T", indicate that the individual character is a literal that cannot be changed. The apostrophes do not appear in the output string.
|
RFC1123 | 2 |
The pattern reflects a defined standard RFC 1123. This format is always the same, regardless of the culture used. The custom format string is "ddd, dd MMM yyyy HH':'mm':'ss 'GMT'".
This value will always return as GMT. If the corresponding date-time stored in the database is 2016-03-29T08:00:00 and the date time of the server is in PST then the result will be
shown as Tue, 29 Mar 2016 15:00:00 GMT. So the server time will reflect the result of the value. If the server time is UTC then the corresponding value would be Tue, 29 Mar 2016 08:00:00 GMT.
|
UnixTime | 3 |
This format is defined as the number of seconds that have elapsed since 00:00:00 with a default of Coordinated Universal Time (UTC), Thursday, 1 January 1970, not counting leap seconds.
This schema does not return a time zone offset. It is assumed to be UTC unless otherwise documented. Please refer to the contracts final schema output type for the specified
time zone offset. In some instances this value can result by the TimeZoneKey If you want to force the result to be UTC then
use UnixTimeUTC enum type.
|
UnixTimeUTC | 4 |
This format is defined as the number of seconds that have elapsed since 00:00:00 Coordinated Universal Time (UTC), Thursday, 1 January 1970, not counting leap seconds.
This schema will always use the UTC time offset.
|
Remarks
Represents a group of enums that will format any DateTime[Schema] response property based on its type.
Example Date Time Scheme Types
Type | Output Example |
---|
(0) ISO8601Sort | 2016-03-21T09:00:00 |
(1) ISO8601 | 2016-03-21T09:00:00.0000000 |
(2) RFC1123 | Mon, 21 Mar 2016 09:00:00 GMT |
(3) UnixTime | 1458586800 |
(4) UnixTimeUTC | 1458586800 |
Note |
---|
For SOAP calls use the literal string value (ISO8601Sort, ISO8601, RFC1123, UnixTime, UnixTimeUTC). For REST calls use the enum int value (0,1,2,3,4).
|
See Also