UTC file time

Rusty

Well-Known Member
Licensed User
Longtime User
I am trying to synchronize files between my server in Chicago and my tablet in Los Angeles. There will be tablets talking to the Chicago server all over the world and I need to be able to determine if a file on the server's time matches that of each tablet worldwide.

I've worked with the Datetime functions, settimezone, etc. as well as the Dateutils and have not been able to come up with a UTC time on which to synchronize these dates.

Any advice will be greatly appreciated.
Rusty
 

blong

Active Member
Licensed User
Longtime User
Alternative

Thinking laterally...

Why not embed a file version into the file name...

e.g. original file placed on server is myfile_ver001

Software on each tablet checks if they have same filename and if not downloads the latest version of myfile e.g. myfile_ver002

File is always called myfile and the second hhalf of name identifies version...

:)
 
Upvote 0

Rusty

Well-Known Member
Licensed User
Longtime User
So settimezone actually sets the timezone not the offset, right?
If i use datetime.settimezone(-6) is wrong if I want the Chicago time expressed in UTC, i need to say datetime.settimezone(0)?
right?
 
Upvote 0

Rusty

Well-Known Member
Licensed User
Longtime User
Thanks Erel, I didn't understand that SetTimeZone tells the DateTime function to adjust the date TO that time zone (zero for GMT), I thought it was to tell the DateTime function that, for example you want the date in -6 time zone.
Thanks for the clarification. BTW, it works great, once I understood how it worked.
Rusty
 
Upvote 0
Top