Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!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.029 X-Spam-Evidence: '*H*': 0.94; '*S*': 0.00; 'subject:question': 0.10; 'cc:addr:python-list': 0.11; '-tkc': 0.16; 'from:addr:python.list': 0.16; 'from:addr:tim.thechases.com': 0.16; 'from:name:tim chase': 0.16; 'internally': 0.16; 'then?': 0.16; 'utc': 0.16; 'wrote:': 0.18; 'possible,': 0.19; 'cc:addr:python.org': 0.22; 'cc:2**0': 0.24; 'cc:no real name:2**0': 0.24; 'header:In-Reply-To:1': 0.27; 'operations.': 0.31; 'convert': 0.35; 'but': 0.35; 'charset:us-ascii': 0.36; 'should': 0.36; 'server': 0.38; 'how': 0.40; 'back': 0.62; 'soon': 0.63; 'to:addr:gmail.com': 0.65; 'presented': 0.69; 'received:50.22': 0.84 Date: Tue, 12 Nov 2013 09:54:44 -0600 From: Tim Chase To: Ferrous Cranus Subject: Re: datetime question In-Reply-To: References: X-Mailer: Claws Mail 3.8.1 (GTK+ 2.24.10; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - boston.accountservergroup.com X-AntiAbuse: Original Domain - python.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - tim.thechases.com X-Get-Message-Sender-Via: boston.accountservergroup.com: authenticated_id: tim@thechases.com Cc: python-list@python.org 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: 14 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1384271596 news.xs4all.nl 15981 [2001:888:2000:d::a6]:36823 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:59210 On 2013-11-12 17:24, Ferrous Cranus wrote: > But what of the server was in California and i live in Greece? > > How would datetime.now() work then? Best practices say to move the value from local time to UTC as soon as possible, then store/use the UTC time internally for all operations. Only when it's about to be presented to the user should you convert it back to local time if you need to. -tkc