cloud timestamps

Discussion and help for Easy Save 3
Post Reply
krolldk
Posts: 25
Joined: Sun Jun 02, 2019 11:15 am

cloud timestamps

Post by krolldk »

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 :-)
User avatar
Joel
Moodkie Staff
Posts: 4826
Joined: Wed Nov 07, 2012 10:32 pm

Re: cloud timestamps

Post by Joel »

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.
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 :-)
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 either :lol:

All the best,
Joel
Joel @ Moodkie Interactive
Purchase Easy Save | Contact | Guides | Docs | Getting started
krolldk
Posts: 25
Joined: Sun Jun 02, 2019 11:15 am

Re: cloud timestamps

Post by krolldk »

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.
Post Reply