Python 3.5 Dropbox API modified date doesn't update
<p>I'm writing a script in python3.5 that needs to check if the file on dropbox is 
newer then a local file. If the file is newer, it needs to download the file.</p>

<p>The problem I'm having is that the date on the server doesn't seem to update. Is it possible that it only update on certain times?</p>

<pre><code>code snippet:
    def check_if_needed(dbx):
        server_date = dbx.files_get_metadata('/Verlichting.zip').server_modified
        version_epoch = os.path.getmtime('versie.txt')
        version_date = datetime.datetime.fromtimestamp(version_epoch)

        print (server_date)
        print (version_date)

    if (version_date &lt; server_date):
        return True


    return False
</code></pre>

<p>output:<br>
    2016-10-10 13:05:35<br>
    2016-10-10 15:04:25.861405<br>
<br>
what it should be:<br>
2016-10-10-15:10:00<br>
2016-10-10 15:04:25.861405</p>

<p>So it returns False, while it has to be True.</p>

<p>I have updated the file on dropbox a couple of times, but it stil doesn't update. I have also looked on the internet but I couldn't find anything. Also I doesn't use the dropbox client, but directly in the browser, and yes I'm updating the file in the Apps folder created by dropbox ;)
If more information is needed, let me know!</p>

<p>Anyone able to help me?
Thanks in advance!</p>

<p>The problem was the difference between timezones. I'm in GMT +2 while dropbox is GMT +0. So I chanced this line</p>

<pre><code>version_date = datetime.datetime.fromtimestamp(version_epoch) - datetime.timedelta(hours=2)
</code></pre>

<p>Now it works perfectly.</p>

python python-3.x dropbox