PHP - Setting up/emulating fake date -
i have bit weird question. possible set fake date in php time in script working? using api uses time periods, example when send request data, can specify time period (for example 1 month, these periods fixed) , return results request_time-1month request_time. obviously, request data present time, want emulate present time (for example set date 10 may 15 april). possible? can't see helpful in php documention , don't know if work, because i'm not sure if api uses time server in works or independent server stores aforementioned data. maybe has idea.
thanks advance.
if api connecting using "request_time - 1 month", your script thinks time isn't relevant, time the script behind api thinks is. (as silly analogy: if shop closes @ 5pm, setting watch won't let in @ 5:30; you'd need sneak in , change clock on wall staff don't lock up.)
so unless can find way fool remote api thinking sent request @ different time, there nothing can do.
if control api, edit api have parameter over-rides definition of "now", perhaps allowed in special debug mode.
Comments
Post a Comment