In article ,
donarb wrote:
> Note that it's bad form to post the same question to different forums, you
> also posted this question to django-users. By posting to multiple forums, you
> run the risk of not having the question answered or followed up in one of the
> forums. This frustrates oth
Note that it's bad form to post the same question to different forums, you also
posted this question to django-users. By posting to multiple forums, you run
the risk of not having the question answered or followed up in one of the
forums. This frustrates other users who may one day have a simila
Op 2014-03-03T12:22:48 UTC schreef donarb in het
bericht , ID: <04659633-e14e-4d5b-90f2-93af04f05...@googlegroups.com> het
volgende.
> You're using the months format '%m' when you should be using minutes
> '%M'.
Arrgh: stupid error (snik).
p 2014-03-04T08:11:46 UTC schreef Chris Angelico in
On Tue, Mar 4, 2014 at 7:22 AM, donarb wrote:
> You're using the months format '%m' when you should be using minutes '%M'.
Heh! I didn't even notice that. When I tested it, I didn't use
strftime at all, just looked at gmtime's output.
ChrisA
--
https://mail.python.org/mailman/listinfo/python-li
Jaap van Wingerde 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 w
On Monday, March 3, 2014 6:28:21 AM UTC-8, Jaap van Wingerde wrote:
> Op schreef Chris Angelico
> in bericht
> :
>
> > See if ls is actually giving you ctime rather than mtime - compare the
> > results if you ask for os.path.getctime.
>
> jaap@liakoster:~$ python
> Python 2.7.3 (default, Jan
Op schreef Chris Angelico
in bericht :
> See if ls is actually giving you ctime rather than mtime - compare the
> results if you ask for os.path.getctime.
jaap@liakoster:~$ python
Python 2.7.3 (default, Jan 2 2013, 13:56:14)
[GCC 4.7.2] on linux2
Type "help", "copyright", "credits" or "licen
On Tue, Mar 4, 2014 at 12:35 AM, Jaap van Wingerde
wrote:
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
>
Django views.py:
...
pwd = os.path.dirname(os.path.realpath(__file__ ))
home_lastmod =
strftime('%Y-%m-%dT%H:%m:%SZ',gmtime(os.path.getmtime(pwd+'/templates/art_index.html')))
...
The template gives a wrong modification time: "2014-03-02T19:03:55Z".
...
jaap@liakoster:~$ python
Python 2.7.3 (de