Path: csiph.com!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.fsmpi.rwth-aachen.de!news.unit0.net!cyclone03.ams2.highwinds-media.com!news.highwinds-media.com!voer-me.highwinds-media.com!peer03.am1!peering.am1!npeersf04.am4!fx26.am4.POSTED!not-for-mail From: mm0fmf User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130801 Thunderbird/17.0.8 MIME-Version: 1.0 Newsgroups: comp.lang.python Subject: Re: datetime question References: In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Lines: 23 Message-ID: NNTP-Posting-Host: 92.236.234.65 X-Complaints-To: http://netreport.virginmedia.com X-Trace: 1384212106 92.236.234.65 (Mon, 11 Nov 2013 23:21:46 UTC) NNTP-Posting-Date: Mon, 11 Nov 2013 23:21:46 UTC Organization: virginmedia.com Date: Mon, 11 Nov 2013 23:21:40 +0000 X-Received-Body-CRC: 3717058160 X-Received-Bytes: 1742 Xref: csiph.com comp.lang.python:59118 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.