Whether a user is listing an item, browsing listings, or performing other business tasks:

  • Some data is handled in a standard way for all requests;
  • Some data is required with all requests;
  • And while some data is applicable only to certain calls, how it is used is standardized.

For additional information, refer to:

Summary of data types

The Trading API incoirporates a number of standard simple data types and defines a few additional core data types:

  • eBay Namespace

    The Trading API schema identifies one eBay namespace: xmlns:ebl="urn:ebay:apis:eBLBaseComponents". When you are making Trading API calls, you only need specify the namespace on the "Request" tag in the body of the call.

  • eBay Types

    The Trading API has a number of complex and enumerated types in its schema such as ItemType and CountryCodeType.

  • XML schema simple types

    A number of elements in the schema (e.g., CategoryID,) are XML Simple Schema Types (e.g., string).

Time values

Depending on location and development environment, date-time values returned from eBay may appear to be different from the timestamps seen on the Production or Sandbox version of the eBay website.

Why do time values seem inconsistent with the web site?

The eBay Web site displays time values in a local time zone or in Pacific Time. For example, the US site uses Pacific Time. However, in most cases, the eBay Platform time-stamps all events and transactions in Universal Coordinated Time (UTC), also known as Greenwich Mean Time (GMT). So, unless otherwise specified for a particular field or call, all date-time values returned from eBay are in GMT (specifically, the Zulu format), not in the time zone displayed on the Web site.

Hours are displayed in the 24-hour format (e.g., 2:00:00pm is shown as 14:00:00,) and comply with ISO 8601 Date and Time Formats.

For simplicity, eBay refers to UTC/GMT/Zulu time as "GMT" in this documentation.

About GMT

By international convention, GMT is used as the basis for determining the official time in all time zones around the world. GMT express the time of day on Earth at 0˚ longitude (i.e., the Greenwich Meridian). Historically, GMT is associated with Greenwich, England. Unlike many local time zones, GMT does not switch to daylight-saving time in the spring.

Convert between UTC/GMT and local time

If you prefer to display or work with date-time values in a particular time zone, your application needs to handle the conversion between GMT and that time zone.

Third-party libraries

Some programming languages include classes, functions, modules, or other constructs for converting between a local time and GMT (or times in any two zones) and adjusting for daylight-saving time.

Some development environments automatically convert SOAP dateTime values to your local system time. In this case, you would only need to convert a time value if you want to display a value other than your local system time, or if you need to convert time values in order to work with the XML API.

Perform the conversion locally

To program the conversion to or from GMT by using your own algorithm, you need to know the GMT offset and daylight-saving time behavior in the local time zone. (Two locations with the same GMT offset might not use the same daylight-saving time rules.) The offset is the difference between the current time in the local time zone and GMT. GMT does not switch to daylight-saving time, so if the local time zone does, the offset will change twice a year. Depending on the country the user is in, daylight-saving time starts in March or April and lasts through September or October.

Information about GMT offsets for different time zones is widely available. For example, you can search for "Time Zone Guide GMT" on the Internet. Your computer's clock application may also list GMT offsets for different time zones.

  • West of the Greenwich Meridian

    If the local time zone is west of the Greenwich Meridian, the offset is negative.

    For example, when it is 17:00:00 GMT (5:00 PM) GMT, it is 09:00:00 PST (9:00 AM Pacific Standard Time) in California, US, during winter. So, the GMT offset for PST is -8:00.

    To convert from GMT to PST and back, use the following formulae:

    • PST = GMT - 8 hours
    • GMT = PST + 8 hours
    • PST = 17:00:00 - 8:00:00 = 09:00:00
    • GMT = 09:00:00 + 8:00:00 = 17:00:00

    During Pacific Daylight Time (PDT), the GMT offset for PDT is -7:00 (-8 + 1):

    • PDT = GMT - 7 hours
    • GMT = PDT + 7 hours
    • PDT = 17:00:00 - 7:00:00 = 10:00:00
    • GMT = 10:00:00 + 7:00:00 = 17:00:00
  • East of the Greenwich Meridian

    If the local time zone is east of the Greenwich Meridian, the offset is positive.

    For example, when it is 17:00:00 (5:00 PM) GMT, it is 03:00:00 AEST (3:00 AM Australian Eastern Standard Time) the next morning in Canberra, Australia. So, the GMT offset for AEST is +10:00.

    To convert from GMT to AEST and back, you use the following formulae:

    • AEST = GMT + 10 hours
    • GMT = AEST - 10 hours
    • AEST = 17:00:00 + 10:00:00 = 03:00:00
    • GMT = 03:00:00 - 10:00:00 = 17:00:00

    During Australian Eastern Daylight Time (AEDT), the GMT offset for AEDT is +11:00 (+10 + 1):

    • AEST = GMT + 11 hours
    • GMT = AEST - 11 hours
    • AEST = 17:00:00 + 11:00:00 = 04:00:00
    • GMT = 04:00:00 - 11:00:00 = 17:00:00

Convert between Pacific Time (PST/PDT) and local time

If you need to convert Pacific Time values to time values for another time zone, you can use one of these approaches:

  • Use the formulas described in Convert between UTC/GMT and local time to convert from Pacific Time to GMT and then from GMT to the corresponding time in the local time zone.
  • Determine the offset between Pacific Time and the local time and convert the value in one step.