php - 如何修复 : The difference between the request time and the current time is too large

标签 php laravel amazon-web-services amazon-s3 timezone

我从 AWS 收到此错误:

App\Services\Exceptions\Exception thrown with message "Error in updated facebook event in the systemError executing "PutObject" on "n.jpg"; AWS HTTP error: Client error: PUT n.jpg resulted in a 403 Forbidden response: RequestTimeTooSkewedThe difference between the reque (truncated...) RequestTimeTooSkewed (client): The difference between the request time and the current time is too large. - RequestTimeTooSkewedThe difference between the request time and the current time is too large.20180403T075710Z2018-04-03T06:57:48Z900000"

它表示请求时间是:7:57 am,服务器时间是:6:57 am

但是我的本地机器时间是:9:57 am(不使用 vagrant 或任何服务器)。

我的 AWS 在俄亥俄州,时间是:2:57 am

我要更改什么来修复此错误?

我正在构建一个 php/Laravel 5.5 项目。

最佳答案

您需要更新 AWS 服务器和本地计算机上的时间。最好的方法是运行 ntpdate 命令来同步时间。

命令:

sudo ntpdate -u in.pool.ntp.org

关于php - 如何修复 : The difference between the request time and the current time is too large,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49624148/

相关文章:

javascript - 动态创建的表无法识别无序列表标签

php - 如何更改此代码以显示内联 block ?

javascript - 在 laravel 上删除对象

php - Laravel在同一模型上的父/子关系

node.js - 如何使用 node.js 向 aws 实例成功进行 http POST?

ruby-on-rails - 从 s3 存储桶删除对象 Rails 5 aws-sdk

php - MySQL SELECT 行匹配数组?

php - Mime 类型 PDF php 上传

php - Laravel SQLSTATE[42000] : Syntax error or access violation

amazon-web-services - 开发云信息模板的最佳工具/框架是什么