TimeZone问题 [英] TimeZone issue
问题描述
您好
我正在使用报告服务来获取yesteday广告系列的结果。
Im using Report Service to get the results of yesteday campaigns.
我是 使用php SDk,运行PHP版本7.2:
ReportTimePeriod ::昨天;
如果我在上午8点(UTC 0)运行脚本和帐户时区也是UTC 0,一切运作良好
If i run the script at 8.00 AM (UTC 0) and the account timezone is UTC 0 too, everything works well
但如果我在06:00 AM运行脚本,昨天给我两天前的结果。
But if i run the script at 06:00 A.M, yesterday give me the results of two days ago.
我尝试将 ReturnOnlyCompleteData 设置为true但我没有工作
I tried to set ReturnOnlyCompleteData to true but i didn t work
Environment :
生产
提前致谢
推荐答案
对于相对时区,请设置
ReportTime.ReportTimeZone ,否则 PacificTimeUSCanadaTijuana 是默认情况下使用。按文档:
For the relative time zone please set ReportTime.ReportTimeZone, otherwise PacificTimeUSCanadaTijuana is used by default. Per the doc:
如果您没有选择时区,则报表服务默认使用PacificTimeUSCanadaTijuana。例如,请求的报表没有指定时区在2014年9月2日的EasternTimeUSCanada上午2点,'昨天'将被解释为8月31日的请求
。同时请求'昨天'并且时区设置为EasternTimeUSCanada的报告将是解释为9/1/2018的请求。
请同时参考
Time Zo报告指南。
Please also refer to the Time Zones in Reporting guide.
祝你好运,
Eric
这篇关于TimeZone问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!