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: 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 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> <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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: 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 Op 2014-03-03T12:22:48 UTC schreef donarb in het bericht , ID: <04659633-e14e-4d5b-90f2-93af04f056be@googlegroups.com> = het volgende.=20 > 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 het bericht , ID: het volgende.=20 > 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 = in het bericht , ID: <85txbfhu0i.fsf@benfinney= .id.au> het volgende. > You're using =E2=80=98gmtime=E2=80=99 to display the Python datetime valu= e, but =E2=80=98ls=E2=80=99 > 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 =3D strftime('%Y-%m-%dT%H:%M:%SZ',gmtime(os.path.getmtime(os.p= ath.dirname(os.path.realpath(__file__ ))+'/templates/art_index.html'))) ... --=20 Jaap van Wingerde e-mail: 1234567890@vanwingerde.nl