Jaap van Wingerde <mailingli...@vanwingerde.nl> writes:

> >>> time.strftime('%Y-%m-%dT%H:%m:%SZ',gmtime(os.path.getmtime('/var/django/test2/art/templates/art_index.html')))
> >>>   
> '2014-03-02T19:03:55Z'
> >>> quit()  
> jaap@liakoster:~$ ls --full-time 
> /var/django/test2/art/templates/art_index.html
> -rwxrwx--- 1 lia www-data 2456 2014-03-02 19:16:55.568139590 +0000 
> /var/django/test2/art/templates/art_index.html
> jaap@liakoster:~$ 
> ...
>
> ls gives the right modification time. What is wrong?

You're using ‘gmtime’ to display the Python datetime value, but ‘ls’
will display the time in the local timezone. Do you have a strange
timezone set?

What value does the Python datetime value show in the local timezone?
How does that compare to the time shown by ‘ls’?

-- 
 \              “When cryptography is outlawed, bayl bhgynjf jvyy unir |
  `\                                              cevinpl.” —Anonymous |
_o__)                                                                  |
Ben Finney

-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to