NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
Time offset for smart sync
Veteran

Joined: 06 Jun 2007
Posts: 289
Location: Vancouver, Canada
Reply with quote
I am having difficulty setting the appropriate time offset so that Smart Sync will work correctly. The documentation explains the reason for the time offset nicely, but does not tell us which way to measure the difference. For example, is it remote sever time minus local time, or is it local time minus remote server time Rolling Eyes

My setup is as follows:
Remote server time zone: GMT
My time zone: Pacific GMT -8 hours
Right now we have daylight saving: GMT -7 hours

I have tried a time offset of -8, -7, 7 and 8, and even 0. I either get that all files upload/download, or none at all Shocked And in case it makes a difference, I am using an FTP account.

Please help me figure this out.
View user's profileFind all posts by annoSend private messageVisit poster's website
Veteran

Joined: 06 Jun 2007
Posts: 289
Location: Vancouver, Canada
Reply with quote
I will answer my own question in case it helps someone else Wink

Quote:
My setup is as follows:
Remote server time zone: GMT
My time zone: Pacific GMT -8 hours
Right now we have daylight saving: GMT -7 hours


To make Smart Sync work, use the following:
* Time offset = remote server time minus local time (7 hours for my example)
* Use SFTP (not FTP) to enable Smart Sync to set file times on the remote server.

A nice improvement would be for PhpED to automatically adjust for daylight saving Idea
View user's profileFind all posts by annoSend private messageVisit poster's website
Site Admin

Joined: 13 Jul 2003
Posts: 8344
Reply with quote
Quote:
A nice improvement would be for PhpED to automatically adjust for daylight saving

different countries use different schedule for daylight saving period. Even if we know the OFFSET in hours, we still do not know the COUNTRY Smile

_________________
The PHP IDE team
View user's profileFind all posts by dmitriSend private messageVisit poster's website
Veteran

Joined: 06 Jun 2007
Posts: 289
Location: Vancouver, Canada
Reply with quote
That is true, but...

Why not let the OS manage the time zones and daylight saving changes?

As far as I know, Windows (probably Linux too) internally uses GMT for file times, and merely displays file times to the user in accordance with the time zone setting on the PC. Thus, in principle, all the PhpEd needs to know is the timezone of the remote server -- it should be able to figure out the timezone of the local PC and the time difference by itself Idea
View user's profileFind all posts by annoSend private messageVisit poster's website
Veteran

Joined: 26 Dec 2006
Posts: 253
Location: Phoenix, AZ
Reply with quote
How about a feature to determine the difference automatically? The IDE could save a file to the server and then check its timestamp and figure out the difference from local time. Since we're only concerned about hours, worries about the slight delay are mostly minimized and the one edge case remaining (doing the operation right around the hour change-over) is pretty easy to detect and handle.
View user's profileFind all posts by bobwilliamsSend private messageVisit poster's website
Site Admin

Joined: 13 Jul 2003
Posts: 8344
Reply with quote
it's not about determining the difference at all Smile
it's about daylight may affect the difference when is already set.
Certainly, if both client and server operate in GMT, there should be no problem at all.

_________________
The PHP IDE team
View user's profileFind all posts by dmitriSend private messageVisit poster's website
Veteran

Joined: 06 Jun 2007
Posts: 289
Location: Vancouver, Canada
Reply with quote
Quote:
Certainly, if both client and server operate in GMT, there should be no problem at all.

Your comment does not solve the problem at all Confused In contrast, I think bobwilliams is on to a nice idea.
View user's profileFind all posts by annoSend private messageVisit poster's website
Site Admin

Joined: 13 Jul 2003
Posts: 8344
Reply with quote
I do not see any problems there. If your server is located in another country that uses different daylight saving schedule, don't forget to adjust timeoffset two times a year.

_________________
The PHP IDE team
View user's profileFind all posts by dmitriSend private messageVisit poster's website
Time offset for smart sync
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT - 5 Hours  
Page 1 of 1  

  
  
 Reply to topic