Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #67657
| Date | 2014-03-04 10:33 +0000 |
|---|---|
| From | Jaap van Wingerde <mailinglists@vanwingerde.nl> |
| Subject | Re: modification time in Python - Django: datetime != datetime :-( |
| References | <20140303133541.66fccbbb@lia.custard.shrl.nl> <CAPTjJmrp9Ca5zyfo75NKcX_ik0Qi4kOcjhhY6EEWKQ-xJx7KQg@mail.gmail.com> <mailman.7646.1393856904.18130.python-list@python.org> <04659633-e14e-4d5b-90f2-93af04f056be@googlegroups.com> |
| Organization | Yellow matter custard |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.7699.1393929204.18130.python-list@python.org> (permalink) |
Op 2014-03-03T12:22:48 UTC schreef donarb <donarb@nwlink.com> in het
bericht <Re: modification time in Python - Django: datetime !=
datetime :-(>, ID: <04659633-e14e-4d5b-90f2-93af04f056be@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 <rosuav@gmail.com> in
het bericht <Re: modification time in Python - Django: datetime !=
datetime :-(>, ID: <CAPTjJmrz-oq-YLZ_0=jHgj9B1y4s_6bZfN52XMn6Xw10TXE2FQ@mail.gmail.com>
het volgende.
> Heh! I didn't even notice that. When I tested it, I didn't use
> strftime at all, just looked at gmtime's output.
Op 2014-03-04T08:06:21 UTC schreef Ben Finney <ben+python@benfinney.id.au> in het bericht <Re: modification time in
Python - Django: datetime != datetime :-(>, ID: <85txbfhu0i.fsf@benfinney.id.au> het volgende.
> 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?
I only use UTC.
Thanks!!!!
The view.py is now as follows.
...
home_lastmod = strftime('%Y-%m-%dT%H:%M:%SZ',gmtime(os.path.getmtime(os.path.dirname(os.path.realpath(__file__ ))+'/templates/art_index.html')))
...
--
Jaap van Wingerde
e-mail: 1234567890@vanwingerde.nl
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Re: modification time in Python - Django: datetime != datetime :-( Jaap van Wingerde <mailinglists@vanwingerde.nl> - 2014-03-03 14:28 +0000
Re: modification time in Python - Django: datetime != datetime :-( donarb <donarb@nwlink.com> - 2014-03-03 12:22 -0800
Re: modification time in Python - Django: datetime != datetime :-( Chris Angelico <rosuav@gmail.com> - 2014-03-04 08:11 +1100
Re: modification time in Python - Django: datetime != datetime :-( Jaap van Wingerde <mailinglists@vanwingerde.nl> - 2014-03-04 10:33 +0000
Re: modification time in Python - Django: datetime != datetime :-( donarb <donarb@nwlink.com> - 2014-03-04 08:45 -0800
Re: modification time in Python - Django: datetime != datetime :-( Roy Smith <roy@panix.com> - 2014-03-04 12:43 -0500
csiph-web