Path: csiph.com!usenet.pasdenom.info!news.etla.org!news.stack.nl!newsfeed.xs4all.nl!newsfeed1.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.011 X-Spam-Evidence: '*H*': 0.98; '*S*': 0.00; 'from:addr:yahoo.co.uk': 0.04; 'ascii': 0.09; 'dst': 0.09; 'lawrence': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'tismer': 0.09; 'subject:question': 0.10; 'python': 0.11; '11:19': 0.16; 'heap': 0.16; 'luck!': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'language': 0.16; 'wrote:': 0.18; 'written': 0.21; '>>>': 0.22; 'programming': 0.22; 'header :User-Agent:1': 0.23; 'mon,': 0.24; 'second': 0.26; 'header:X -Complaints-To:1': 0.27; 'header:In-Reply-To:1': 0.27; 'idea': 0.28; 'am,': 0.29; 'posting': 0.31; '>>>>': 0.31; 'universal': 0.31; 'except': 0.35; 'but': 0.35; 'add': 0.35; '+0200,': 0.36; 'adjust': 0.36; 'christian': 0.38; 'nov': 0.38; 'to:addr:python- list': 0.38; 'itself': 0.39; 'to:addr:python.org': 0.39; 'received:org': 0.40; 'world.': 0.61; 'happen': 0.63; 'our': 0.64; '8bit%:100': 0.72; 'basement': 0.84; 'boy,': 0.84; 'ethan': 0.84; 'furman': 0.84; 'preventing': 0.84; 'received:as9105.com': 0.84; 'received:dsl.as9105.com': 0.84; 'received:dynamic.dsl.as9105.com': 0.84; '2013': 0.98 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: Mark Lawrence Subject: Re: datetime question Date: Mon, 11 Nov 2013 23:48:51 +0000 References: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Gmane-NNTP-Posting-Host: 80-44-199-176.dynamic.dsl.as9105.com User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:24.0) Gecko/20100101 Thunderbird/24.1.0 In-Reply-To: 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: 33 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1384213745 news.xs4all.nl 15879 [2001:888:2000:d::a6]:57440 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:59119 On 11/11/2013 23:21, mm0fmf wrote: > On 11/11/2013 19:39, Ethan Furman wrote: >> On 11/11/2013 11:19 AM, Denis McMahon wrote: >>> On Mon, 11 Nov 2013 11:57:36 +0200, Νίκος Αλεξόπουλος wrote: >>> >>>>> lastvisit = ( datetime.utcnow() + timedelta(hours=2) ).strftime( >>>>> '%y-%m-%d %H:%M:%S' ) # MySQL datetime format >>> >>>> Someone has an idea what to add to this line to automatically adjust >>>> itself if DST happens? >>> >>> Yes, but the scarcity of universal whitespace is preventing me from >>> posting it. >> >> Boy, are you in luck! I just happen to have a whole heap of marked down >> ascii white-space at bargain basement prices! >> > > Is that metric or imperial whitespace? > > You need metric whitespace for programs written in Europe. > Except for the UK, our multi-national approach means that both imperial and metric whitespace are acceptable. -- Python is the second best programming language in the world. But the best has yet to be invented. Christian Tismer Mark Lawrence