Hi
I'm reading the php for the cloud save solution: Am I correct in assuming that the timestamp is generated clientside ?
This is potentially problematic, if true.
Assume two users are in different timezones, and accessing the same file, at about the same time. user1, in NY will timestamp with NY time, while user2 in copenhagen will timestamp with copenhagen time. the timestamps will be useless, and if you use them for checking file integrity or something like that, they will be error prone.
suggestion: Set and check timestamps in php directly: In that way, you will get SERVER time on the timestamps, and timestamps will be internally consistent.
Unless I'm missing something ? I'm not trying to be a dick here: I really like easySave, and would love to keep using it, I just want the kinks to be sorted out
cloud timestamps
Re: cloud timestamps
Hi there,
The timestamps are generated clientside, but they're always generated as UTC timestamps (i.e. UNIX timestamps), so they're unaffected by the client's timezone.
We don't generate these on the server as these need to be compared with the timestamp of the locally-stored file on the client's computer (which is converted to UTC before comparison), so it wouldn't be possible to do this serverside. Hope this helps clear things up.
All the best,
Joel
The timestamps are generated clientside, but they're always generated as UTC timestamps (i.e. UNIX timestamps), so they're unaffected by the client's timezone.
We don't generate these on the server as these need to be compared with the timestamp of the locally-stored file on the client's computer (which is converted to UTC before comparison), so it wouldn't be possible to do this serverside. Hope this helps clear things up.
Really gratefully for your help, you definitely don't come across as a dick, and I certainly hope I don't come across as one eitherI'm not trying to be a dick here: I really like easySave, and would love to keep using it, I just want the kinks to be sorted out
All the best,
Joel
Re: cloud timestamps
Ah .. I see. UTC timestamps actually makes a lot of sense. I hadn't twigged that.
So.. we shouldn't worry about timezone issues, but still of course badly set client clocks could be a problem in race conditions.
But, there you go. I get the reason you're doing it client side now, and I get why it works.
And no: You don't come across as a dick at all On the contrary, I think you're responding profesionally and patiently.
So.. we shouldn't worry about timezone issues, but still of course badly set client clocks could be a problem in race conditions.
But, there you go. I get the reason you're doing it client side now, and I get why it works.
And no: You don't come across as a dick at all On the contrary, I think you're responding profesionally and patiently.