Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #67657

Re: modification time in Python - Django: datetime != datetime :-(

Path csiph.com!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!newsfeed.xs4all.nl!newsfeed4a.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <mailinglists@vanwingerde.nl>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.004
X-Spam-Evidence '*H*': 0.99; '*S*': 0.00; 'subject:Django': 0.03; 'value,': 0.04; 'subject:Python': 0.06; 'follows.': 0.09; 'python': 0.11; 'bericht': 0.16; 'finney': 0.16; 'header:X-Face:1': 0.16; 'skip:) 30': 0.16; 'strftime': 0.16; 'utc': 0.16; 'utc.': 0.16; 'looked': 0.18; 'all,': 0.19; 'id:': 0.23; 'error': 0.23; 'van': 0.27; 'header:In-Reply-To:1': 0.27; 'chris': 0.29; 'that.': 0.31; 'het': 0.31; 'subject:time': 0.33; 'display': 0.35; 'but': 0.35; "didn't": 0.36; 'should': 0.36; 'ben': 0.38; 'to:addr:python-list': 0.38; 'to:addr:python.org': 0.39; 'even': 0.60; 'e-mail:': 0.61; "you're": 0.61; 'minutes': 0.67; 'received:nl': 0.74
DKIM-Signature v=1; a=rsa-sha1; c=relaxed; d=vanwingerde.nl; h=date :from:to:subject:message-id:in-reply-to:references:mime-version :content-type:content-transfer-encoding; s=postfix; bh=Yzv004mCv huDWVbjzdWtA9t706s=; b=X3qZ7kP+BvahLV7pmfUmIqppE0ieb/ktB+Xk4PAL/ NIyKqc6nM6IH4vaj2+B46z1xON3EbBEJek19SHZZbux0hKY5DZ4dUeHCWU3vWOSx 17OcW7BxgqyBMBDFsdUlc9FFvxF+dzExGEnkfZj7ZlqH8X6Gwr9AOuq2R4zdanQE UA=
DomainKey-Signature a=rsa-sha1; c=nofws; d=vanwingerde.nl; h=date:from :to:subject:message-id:in-reply-to:references:mime-version :content-type:content-transfer-encoding; q=dns; s=postfix; b=gqS HOSiaw9FjHqBicmv5pgZ9uEVl2l/rLpNsZAcQssRu6nB6jNX+HQv9RxfDzLnbA7U 9gAXWjjGvQ4Wsl6Cy/X6ISSDCQ/XxqvBLEDaJfZFOq7dUQ8wU/Nw+zTUfg4OedyV JWanX8CC6PsnuCh65iW95UBfUASVcc+Bdf7wYR+M=
Date Tue, 4 Mar 2014 10:33:19 +0000
From Jaap van Wingerde <mailinglists@vanwingerde.nl>
To python-list@python.org
Subject Re: modification time in Python - Django: datetime != datetime :-(
In-Reply-To <04659633-e14e-4d5b-90f2-93af04f056be@googlegroups.com>
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
X-Mailer Claws Mail 3.8.1 (GTK+ 2.24.10; x86_64-pc-linux-gnu)
Face iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAJFBMVEUAgAAAAACAAACAgAAAAICAAIAAgICAgIDAwMD/AAAA/wD//wAC7L7VAAAAAXRSTlMAQObYZgAAAAFiS0dEAIgFHUgAAAAJcEhZcwAACxMAAAsTAQCanBgAAAAHdElNRQfdBwoTDDVbjw8jAAABOElEQVQ4y43UvW7DIBAHcFYrSy6ZkKcmU9Sp8hTlJYM9nfwSRZkQL9f78AcEaGspkvHP978Atk1sHCYbeahAT5ehAqBH/wYAdfB/wyb/gGOHZRTfajpEt//fHdwcY3gHijqaztnnwRcTREfxAYuZB8M9nqZcEsS5WiEQsBLV/RaFtSiD2KqgBrWK71aPKHCoQJj1Vz4l6aLngNiAZkUFkj1ft8os1y3yhlAbcJCAdTxxAYcJADLcCSY6c/0GVuBGMPIZrOAV1ih0G+AWpdAvoEOJumRgMY/CBagFQgawAD+zKAl8alMAgvGDYJR7nAJNr/d7BWj3ErilgqVMAZ2q1yaGBwITKMgSM7y+QDJ45E83gelBcLkOjxXimSrOAKdPArwOQ7qF8TUM95mbh/GWfRqCvCqm9Vn6AVedh3IieXijAAAAAElFTkSuQmCC
X-Face %LIaV:iO8c/&LL=oTL+DA81R|Jx$8(nvk|s9C7EpFdU\x{"_^Pb6g%27.7%v1JYO'8d?Xkc 5fgqcQ=#?Nl[tJ"qF; T}:`lbYgPq9Y+; (ix3]7~>yY|i'PQ9G|`?avU-{FDxP[A5r&x9~&/O8q<\,p n>'3Kb/vFzwP[D\;#$s"_T;8SP/C`l}'iJrv=[$]74
X-GPG-Key-Fingerprint 375E BAF0 0EA5 A139 1C2C CF30 9CAC 95F9 049E 3C96
X-GPG-Key-ID 9CAC95F9049E3C96
X-Abuse abuse@shrl.nl
Mime-Version 1.0
Content-Type text/plain; charset=UTF-8
Content-Transfer-Encoding quoted-printable
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.7699.1393929204.18130.python-list@python.org> (permalink)
Lines 45
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1393929204 news.xs4all.nl 2899 [2001:888:2000:d::a6]:42229
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:67657

Show key headers only | View raw


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 | NextPrevious in thread | Next in thread | Find similar | Unroll thread


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