Path: csiph.com!usenet.pasdenom.info!gegeweb.org!de-l.enfer-du-nord.net!feeder2.enfer-du-nord.net!cs.uu.nl!news.stack.nl!newsfeed.xs4all.nl!newsfeed2.news.xs4all.nl!xs4all!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.047 X-Spam-Evidence: '*H*': 0.91; '*S*': 0.00; 'that?': 0.05; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'subject: \n ': 0.16; 'subject:entire': 0.16; 'worst': 0.16; 'wrote:': 0.17; 'subject:Issue': 0.17; '(or': 0.18; 'changes': 0.20; 'clock': 0.22; 'header:In-Reply-To:1': 0.25; 'am,': 0.27; 'message-id:@mail.gmail.com': 0.27; 'fri,': 0.30; 'function': 0.30; 'to:addr:python-list': 0.33; 'hi,': 0.33; 'received:google.com': 0.34; 'thanks': 0.34; 'so,': 0.35; 'received:209.85': 0.35; 'subject:with': 0.36; 'received:209': 0.37; 'subject:: ': 0.38; 'to:addr:python.org': 0.39; 'think': 0.40; 'your': 0.60; 'time,': 0.62; 'provide': 0.62; 'serial': 0.66; 'subject:day': 0.66; '2013': 0.84 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:content-type; bh=SBahVTQpjw7LwFd+58JN5pU+coZQWxB/ogwY185NjaM=; b=J3AnTYVyHVuUOrnWS6KQOZ0nzC+odQtiOHE4S5yv/y6LF+YUSuSkIw5/dQrxoyyqgM y8E6OjjLAC7e5ff3IF/OCWD708GtGX7W92j167F+0WaR/Mq3MIV/LMfP5AgO24Gsk5vo 0BkE6IkcLsx8eCYNTDfMgl7wcFm5cn0LHKRun6Z2BD+4sJEB8yO5wIkmocb+4T4N2a8O DE2GY8TDZEm/OucRwOUVgFLwGYy00S4UrIuNgvS2742xbMxy29OyH5mdNkrT1Joj0Q04 iIYljtEiXcg2pvMM/yR1dJkkC2dzsMwSV6yHFxechUB31+dpsSFIihlrgDrMwi5n5zoL 9Lng== MIME-Version: 1.0 X-Received: by 10.58.253.161 with SMTP id ab1mr3176210ved.55.1362088241504; Thu, 28 Feb 2013 13:50:41 -0800 (PST) In-Reply-To: References: Date: Fri, 1 Mar 2013 08:50:41 +1100 Subject: Re: Issue with continous incrementing of unbroken sequence for a entire working day From: Chris Angelico To: python-list@python.org Content-Type: text/plain; charset=ISO-8859-1 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: 1362088243 news.xs4all.nl 6858 [2001:888:2000:d::a6]:42150 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:40191 On Fri, Mar 1, 2013 at 8:44 AM, Morten Engvoldsen wrote: > Hi, > Thanks all for suggestion... > > I am using current date as current date local time. I think > datetime.datetime will provide current local date and time, so > hopefullt the function take care > if the local clock is changed... The worst that can happen is that the date changes and your serial resets when it shouldn't. Can you cope with that? (Or just blame it on the user and let them cope?) If so, it's easy. ChrisA