Three lines

Uber

Developers

Date & Time Formats

Overview

The U4B Rides API uses exactly two date/time formats:

  • Timestamps: Unix epoch milliseconds since 1970-01-01T00:00:00Z, encoded as a decimal string. Example: "1793626200000".
  • Flight date: an airport-local calendar date, formatted exactly as YYYY-MM-DD. Example: "2026-11-20".

Timestamps are always 13-digit strings, not JSON numbers, Unix seconds (10 digits), or ISO 8601 datetimes.


Field Formats

Field Direction Format
context.timestamp Request Timestamp: epoch milliseconds, decimal string
Interval.starts_at, Interval.ends_at: pickup_time_window, dropoff_time_window, flight_time_window Request Timestamp: epoch milliseconds, decimal string
flight_spec.flight_time_spec.date Request Airport-local date, YYYY-MM-DD. No time, no Z suffix, no UTC offset.
ride_estimate.product_estimates.eta.estimated_at Response Timestamp: epoch milliseconds, decimal string
ride_estimate.product_estimates.eta.arrival_at Response Timestamp: epoch milliseconds, decimal string
ride_estimate.product_estimates.fare.expires_at Response Timestamp: epoch milliseconds, decimal string

Durations such as eta.eta_in_seconds are plain integer counts of seconds, not timestamps.


Request Examples

Scheduled pickup

A rider in New York wants a pickup at 08:30 local time on 2026-11-02 (EST, UTC−05:00). That instant is 2026-11-02T13:30:00Z, which is 1793626200000 in epoch milliseconds.

{
  "context": {
    "trace_id": "4f1c2a9e-0b7d-4a51-9a63-2f8f6d1e7c10",
    "timestamp": "1793600000000"
  },
  "intent": {
    "ride_intent_spec": {
      "advance_order_spec": {
        "requested_time_spec": {
          "pickup_time_window": {
            "starts_at": "1793626200000",
            "ends_at": "1793626200000"
          }
        }
      }
    }
  }
}

The examples on this page show only the date/time fields. Other required fields such as participant_spec and origin are omitted.

Airport pickup by flight date

Send date as the calendar date of the flight at the airport in airport_code. Do not convert it to UTC.

{
  "advance_order_spec": {
    "airport_pickup_spec": {
      "flight_spec": {
        "flight_designator": "EK201",
        "airport_code": "DXB",
        "flight_time_spec": {
          "date": "2026-11-20"
        }
      }
    }
  }
}
Value Valid?
"2026-11-20" Yes
"2026-11-20T00:00:00Z" No: contains a time and Z
"2026-11-20+04:00" No: contains an offset
"20261120", "11/20/2026" No: must be exactly YYYY-MM-DD

Airport pickup by flight time window

Set either date or flight_time_window, not both. Window bounds are timestamps: 14:05 local time in Dubai (UTC+04:00) on 2026-11-20 is 1795169100000.

{
  "flight_time_spec": {
    "flight_time_window": {
      "starts_at": "1795169100000",
      "ends_at": "1795169100000"
    }
  }
}

Converting Local Time to Epoch Milliseconds

  1. Start from the local wall-clock time (for example, “08:30 on 2026-11-02”).
  2. Attach the IANA timezone where that time applies, such as America/New_York or Asia/Dubai. Use the timezone of the pickup or the airport, not the timezone of your server or the traveler’s device.
  3. Let a timezone-aware library resolve that to an instant.
  4. Read the instant as epoch milliseconds and send it as a string.
// Java
String startsAt = String.valueOf(
    LocalDateTime.of(2026, 11, 2, 8, 30)
        .atZone(ZoneId.of("America/New_York"))
        .toInstant()
        .toEpochMilli()); // "1793626200000"
# Python 3.9+
from datetime import datetime
from zoneinfo import ZoneInfo

starts_at = str(int(
    datetime(2026, 11, 2, 8, 30, tzinfo=ZoneInfo("America/New_York")).timestamp() * 1000
))  # "1793626200000"

Do not apply the UTC offset twice. Once a timezone-aware library has produced an instant (Instant, ZonedDateTime, an aware datetime, and so on), its epoch value is already correct. Adding or subtracting the offset again shifts the time by hours.

Daylight saving time

  • Use IANA zone IDs, never a fixed offset like -05:00 or EST. The same wall-clock time maps to a different offset depending on the date: 08:30 in America/New_York is 1784118600000 on 2026-07-15 (UTC−04:00) and 1793626200000 on 2026-11-02 (UTC−05:00).
  • On the day clocks go back, some local times happen twice. 01:30 on 2026-11-01 in America/New_York is either 1793511000000 (EDT) or 1793514600000 (EST). Pick one on purpose.
  • On the day clocks go forward, some local times do not exist (for example, 02:30 on 2026-03-08 in America/New_York). Decide how to handle these, for example by moving them forward, before converting.

Common mistakes

Mistake Result
Sending seconds ("1793626200") Interpreted as milliseconds, which is a date in January 1970
Sending a JSON number (1793626200000) Not a decimal string
Sending ISO 8601 ("2026-11-02T13:30:00Z") Not accepted for timestamp fields
Converting with the server’s timezone Pickup is off by the difference between the two timezones
Converting date to UTC The flight may resolve to the wrong day

Reading Response Timestamps

eta.estimated_at, eta.arrival_at and fare.expires_at are already absolute instants in epoch milliseconds. You can compare them directly with the current time or store them without any timezone conversion.

{
  "ride_estimate": {
    "product_estimates": [
      {
        "eta": {
          "estimated_at": "1793625900000",
          "arrival_at": "1793626200000"
        },
        "fare": {
          "fare_id": "c3a5b0e2-6c1f-4f0e-9d1b-7a2e4b8f9d01",
          "expires_at": "1793626800000",
          "currency_code": "USD",
          "contractual": true
        }
      }
    ]
  }
}

Convert a timestamp to local time only when you display it. Use the IANA timezone the reader expects, usually the pickup location’s.

Uber

Developers
© 2026 Uber Technologies Inc.