eBay api过滤器基于当前日期列出

时间:2019-01-16 11:20:01

标签: php html cakephp

1 个答案:

答案 0 :(得分:0)

eBay documentation指示StartTimeFrom是一个dateTime字段。他们的documentation of dateTime说这是ISO8601格式的日期。 PHP的date documentation表示'c'是获得ISO8601时间的格式字符。

因此,只需添加$start_string = date('c', $start_time);,其中$start_time被假定为所需开始时间的UNIX时间戳(例如,您可以从PHP's strtotimeMySQL's UNIX_TIMESTAMP获得) ),然后在您的网址中插入&itemFilter(1).name=StartTimeFrom&itemFilter(1).value=$start_string

相关问题