locked
Synctoy and Daylight Saving time RRS feed

  • Question

  • Hi all, I've had this problem for a good few years now. Twice a year, when the time changes around Spring and Autumn, Synctoy thinks all my files are changed and need re-syncing. This is extremely frustrating since I use Synctoy to synchronise several gigabytes of folders in loads of different locations (over networks, on USB sticks, external hard drives, etc), but because I knew of no solution I've had to deal with wasting several hours of my life letting it do its thing twice a year.

    It's really puzzling why it happens, since, obviously, just because the time on the computer's clock has changed to reflect DST doesn't mean that the timestamp on each file has changed! But even if I had just used Synctoy a couple of hours before the time changes to make sure everything is synchronised, then waited till afterwards without touching or editing absolutely anything, it STILL needs to re-sync everything afterwards! (Yes, I've actually stayed up till 3am to try this, that's how much it annoys me!)

    Is there a solution to this?


    Sunday, March 28, 2010 9:31 PM

All replies

  • Hi manveruppd,

    Would you like to give us some more information, please? For instance, which version of SyncToy are you using? Which OS are you running SyncToy?

    Thanks 


    This posting is provided "AS IS" with no warranties, and confers no rights.
    Monday, March 29, 2010 1:13 AM
  • Hello, I have the same problem. I am using SyncToy 2.1.0.0 and Windows 7 64bit. The timestamp is off by exactly one hour.

    Thanks,

    Kristofer

     

    Edit: I just noticed that this only applied to files located on my external drive. The files located on the internal system disk drive were skipped just as they should.

    Tuesday, March 30, 2010 2:17 PM
  • Hey there, it's happened with all the versions of Synctoy I've used. I'm on the latest one right now (2.1), but it also used to happen with 2.0 and 1.4. I'm using Windows XP. Unlike Kristofer84 in the post below though, on my system it happens whether the folders I'm trying to syncrhonised are both on my hard disk (well, two separate physical drives to be exact, both internal), or if one of them is on an external drive or USB stick.
    Friday, April 2, 2010 1:35 AM
  • Hi,

    Thanks for your info. And would you please help us with some additional info: Did you format your internal disks as FAT32 or NTFS? Did all your sync folder pair have DST problem, or just the folder pair with large folders? Do you remember when was the closest folder change time to the time that DST effects?

    We have noticed the DST issue and are collecting information to investigate it. Anyway, sorry for the inconvenience.

    Thanks

     


    This posting is provided "AS IS" with no warranties, and confers no rights.
    Friday, April 2, 2010 9:38 AM
  • Hi,

    Thanks for your info. And would you please help us with some additional info: Did you format your internal disks as FAT32 or NTFS? Did all your sync folder pair have DST problem, or just the folder pair with large folders? Do you remember when was the closest folder change time to the time that DST effects?

    We have noticed the DST issue and are collecting information to investigate it. Anyway, sorry for the inconvenience.

    Thanks

     


    This posting is provided "AS IS" with no warranties, and confers no rights.
    Friday, April 2, 2010 9:38 AM
  • I have also had this problem for years... Syncing the data on my PC with data on the server.  (I treat my computer is the master, a few others update directly to the server.  All others user the server as 'read only'.

    I believe that the problem is that the PC and the Novell Server use different conventions for time and for coping with daylight savings.  My cure has been to write a python program to change the time-stamp in my PC, which has be be run twice a year on the data file on my PC.  (Takes long minutes to change data-stamp on PC ... takes days for SyncToy to copy all files that are one hours "newer" on one system to the other...

     

    PYTHON LISTING (including wxGUI interface):

    # Change_TimeStamp.py
    #--------------------------------------------------------------------------------------------------
    #
    # For current directory, this routine reas each file and modifies time_stamp
    # by user-specified amount ...
    #
    # Modification/History----------------------
    #
    # 07Mar'09 MPH: type in script found on InterNET
    # 07Mar'09 MPH: modify to make os.stat() work in any specified directory
    # 10Mar'09 MPH: simple wxGUI - fails to cope with global variables
    # 15Mar'09 MPH: simple wxGUI works!
    #
    import os, time, sys
    from stat import *

    # adjust TimeStamp on ALL diles (in ALL subsirectories) of selected directory
    #
    def AdjustTimeStamp_DirectoryTree( sDir, tDIF ):
       
        print ("in Adj() ... sDir = %s .... fDIFF = %s" % ( sDir, tDIF ))
        for root, dir, files in os.walk( sDir ):
       
            print "root      = ", root
            os.chdir( root )                    # change to specified directory ( make os.stat() work! )
       
            for f in files:
                #
                if ( os.path.isfile(f) ):       # if FILE, adjust time; else - do NOTHING
                    st = os.stat(f)
                    atime = st[ST_ATIME]        # time of last access       of specified time
                    mtime = st[ST_MTIME]        # time of last modification of specified time
                    print f, "\t", atime, mtime
                    #
                    # time shift ,,,
                    new_mtime = mtime + tDIF   
                    # modify_time stamp of spefified time,.,
                    os.utime(f, (atime, new_mtime))
            print "\n"


    #===========================================================================
    #
    # create GUI/shell to control time shift ... ...

    import wx

    RootDIR = r"c:\Temp"                        # user specified directory
    timeDIF = -1600                             # time shift in seconds (+3600 ... move ONE hour (60 * 60) back)
                                                #
                                                # in Spring, Time advances (on server too) - PUSH BACK
                                                # in Fall,   Time retreats (on server too) - PUSH FORWARD
    # wxPython Class to create/manage GUI
    #
    class MyForm(wx.Panel):
       
        # constructor for main dialog box ...
        #
        def __init__( self, parent, id ):

            # constructor for main dialog box ...
           
            global RootDIR                      # use global 'RootDIE' at this scope ...
            global timeDIF                      # use global 'timeDIF' at this scope ...

            wx.Panel.__init__( self, parent, -1 )
            panel = wx.Panel( self, -1 )

            # Radio Buttons - Layout controls on panel:
            vs = wx.BoxSizer( wx.VERTICAL )
           
            box1_title = wx.StaticBox( panel, -1, " Specify Time Change " )
            box1 = wx.StaticBoxSizer( box1_title, wx.VERTICAL )
            grid1 = wx.FlexGridSizer( 0, 2, 0, 0 )

            # Radio Buttons - 1st group of controls:
            self.group1_ctrls = []
            radio1 = wx.RadioButton( panel, -1, " Spring Forward", style = wx.RB_GROUP )
            radio2 = wx.RadioButton( panel, -1, " Fall Backward   " )
            text1 = wx.TextCtrl( panel, -1, " FIX(  - ONE hour )" )
            text2 = wx.TextCtrl( panel, -1, " FIX( + ONE hour )" )
            self.group1_ctrls.append((radio1, text1))
            self.group1_ctrls.append((radio2, text2))
           
            for radio, text in self.group1_ctrls:
                grid1.Add( radio, 0, wx.ALIGN_CENTRE|wx.LEFT|wx.RIGHT|wx.TOP, 5 )
                grid1.Add( text,  0, wx.ALIGN_CENTRE|wx.LEFT|wx.RIGHT|wx.TOP, 5 )

            box1.Add( grid1, 0, wx.ALIGN_CENTRE|wx.ALL, 5 )
            vs.Add(   box1,  0, wx.ALIGN_CENTRE|wx.ALL, 5 )

            panel.SetSizer( vs )
            vs.Fit( panel )
            panel.Move( (70,30) )
            self.panel = panel


            # Radio Buttons - Setup event handling and initial state for controls:
            for radio, text in self.group1_ctrls:
                self.Bind(wx.EVT_RADIOBUTTON, self.OnGroup1Select, radio )

            for radio, text in self.group1_ctrls:
                radio.SetValue(0)
                text.Enable(False)


            # DirDialogBix - Create BUTTON to call DirDialog
            b = wx.Button(self, -1, "   Select ROOT Directory for Time Stamp Fix   ", (75,145))
            self.Bind(wx.EVT_BUTTON, self.OnButton, b)


            # Text Box to display currently selected root directory
            sMsg = ( "Selected Directory: %s %s" % (RootDIR," "))
           
            print timeDIF
            print RootDIR
           
            l2 = wx.StaticText(self, -1, sMsg)
            l2.Move( (85,185) )
           
           
            # Execute Button - modify TimeStamp
            b = wx.Button(self, 10, "Execute Adjust Time Stamp on Selected Root ", (75, 220))
            self.Bind(wx.EVT_BUTTON, self.OnClick, b)


        # Process Radio-Button Selection ...
        #
        def OnGroup1Select( self, event ):
            radio_selected = event.GetEventObject()

            global RootDIR                      # use global 'RootDIE' at this scope ...
            global timeDIF                      # use global 'timeDIF' at this scope ...

            for radio, text in self.group1_ctrls:
                if radio is radio_selected:
                    text.Enable(True)
                else:
                    text.Enable(False)
                   
            if ( radio_selected.GetLabel() == " Spring Forward" ):
                timeDIF = -3600
            else:
                timeDIF = +3600

            print timeDIF
            print RootDIR


        # Process Button that activates DirDialog ...
        #
        def OnButton(self, evt):
            # In this case we include a "New directory" button.
            dlg = wx.DirDialog(self, "Choose a directory:",
                              style=wx.DD_DEFAULT_STYLE
                               #| wx.DD_DIR_MUST_EXIST
                               #| wx.DD_CHANGE_DIR
                               )

            # If the user selects OK, then we process the dialog's data.
            # This is done by getting the path data from the dialog - BEFORE
            # we destroy it.

            global timeDIF
            global RootDIR

            if dlg.ShowModal() == wx.ID_OK:
                RootDIR = dlg.GetPath()
               
                # Text Box to display currently selected root directory
                sMsg = ( "Selected Directory:  %s %s" % (dlg.GetPath(),
                         "                                                          "))
                l2 = wx.StaticText(self, -1, sMsg)
                l2.Move( (85,185) )
     
                print timeDIF
                print RootDIR

            # Only destroy a dialog after you're done with it.
            dlg.Destroy()
           
        # Process Button that Executes TimeStamp Adjustment ...
        #
        def OnClick(self, event):

            global timeDIF
            global RootDIR
            print timeDIF
            print RootDIR
           
            AdjustTimeStamp_DirectoryTree( RootDIR, timeDIF )
       

    app = wx.PySimpleApp()
    frame = wx.Frame(None, -1, " Utility to Adjust TimeStamp ")
    MyForm(frame,-1)

    frame.SetSize(wx.Size(400,325))             # (width, height)

    frame.Show(1)
    app.MainLoop()

     

    Sunday, April 4, 2010 8:35 AM
  • Hi JiGuang, my internal hard drives are both formatted as NTFS. However, my USB stick is formatted as FAT32.

    I have two pairs of syncrhonised folders, one syncs HDD0 with HDD1, the other syncs HDD0 with the USB stick. The DST bug occurs in both, so it happens both with NTFS-NTFS and NTFS-FAT32 pairs.

    The closest folder change thing varies. It's been happening for years so I don't remember every single instance, but it varied. In the most recent time change (about a week ago), the closest change was the day before the DST time change. 

    Sunday, April 4, 2010 3:23 PM