All Products
Search
Document Center

Object Storage Service:What do I do if the error message "The difference between the request time and the current time is too large" appears when I request resources from OSS?

Last Updated:Aug 14, 2024

Problem description

The following error message was returned for a resource request to Object Storage Service (OSS).

[ResponseError]: RequestTimeTooSkewed The difference between the request time and the current time is too large.

Cause

The time when the request was initiated is 15 minutes before the current time on the OSS server. OSS determines that the request is invalid and returns the error.

Solution

Check the system time of the device used to send the request and change the system time based on your time zone. You can change the system time of the device that you use to send the request based on the following guidelines:

  • OSS uses Greenwich Mean Time (GMT) as the system time. Therefore, the system time of your device must be set to GMT or a time zone relative to GMT. For example, GMT+00:00 is the GMT 0 time zone.

    • To check the time zone of your device that runs Windows, choose Control Panel > Clock and Region > Set the time and date. For example, if the Time zone drop-down menu displays +08:00, it indicates that your device is in the GMT+08:00 time zone.

    • To check the time zone of your device that runs Linux or UNIX, run the date-R command.

      Note

      In the following figure, +0800 indicates that the device is in the GMT+08:00 time zone.

      +0800

  • OSS is available in many regions. OSS uses GMT as the system time in all regions. Therefore, the system time of your device used to send requests must also be in GMT.

  • This part describes how to change the time zone to a GMT time zone on Windows and Linux devices.

    Important

    Changing the time zone on your application server may affect running services or applications. Exercise caution when you change the time zone in a production environment. After you change the time zone of the system time, we recommend that you restart your device or related services to apply your change.

Windows

  1. Open the Control Pane and click Date and Time or Clock and Region.

  2. Click Change date and time. Click Change time zone.

  3. From the drop-down menu, select (UTC) Coordinated Universal Time or any other GMT time zone.

  4. Confirm the change and close the control panel.

In newer Windows systems, you can also change the time zone from the date and time shown in the taskbar.

Linux

You can use a command to change the time zone. The command may vary with Linux distributions. For most distributions, you can change the time zone by using the following steps:

  1. Open the terminal.

  2. Run the following command to list all available GMT time zones.

timedatectl list-timezones | grep GMT
  1. Set the time zone to the intended one. Sample command:

   sudo timedatectl set-timezone GMT

Scope

  • OSS