Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #40241 > unrolled thread

Re: Issue with continous incrementing of unbroken sequence for a entire working day

Started byMorten Engvoldsen <mortenengv@gmail.com>
First post2013-03-01 10:42 +0100
Last post2013-03-01 10:42 +0100
Articles 1 — 1 participant

Back to article view | Back to comp.lang.python

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: Issue with continous incrementing of unbroken sequence for a entire working day Morten Engvoldsen <mortenengv@gmail.com> - 2013-03-01 10:42 +0100

#40241 — Re: Issue with continous incrementing of unbroken sequence for a entire working day

FromMorten Engvoldsen <mortenengv@gmail.com>
Date2013-03-01 10:42 +0100
SubjectRe: Issue with continous incrementing of unbroken sequence for a entire working day
Message-ID<mailman.2713.1362131401.2939.python-list@python.org>
Hi,
Thanks.. :)
so simply i can use time.strftime("%d%-m-%y  %H:%M")  , and then i can
compare the date....


---------- Forwarded message ----------
From: Chris Angelico <rosuav@gmail.com>
To: python-list@python.org
Cc:
Date: Fri, 1 Mar 2013 18:59:16 +1100
Subject: Re: Issue with continous incrementing of unbroken sequence
for a entire working day
On Fri, Mar 1, 2013 at 6:50 PM, Morten Engvoldsen <mortenengv@gmail.com> wrote:
> Hi,
> No i don't want user to blame when date is changed and serial number
> reset when it should not. Do you think the following function will
> help for this:
>
> import datetime as dt
>>>> import pytz
>>>> utc = pytz.timezone("UTC")
>>>> norway = pytz.timezone("Europe/Norway")
>>>> a = dt.datetime(2008, 7, 6, 5, 4, 3, tzinfo=utc)
>>>> b = a.astimezone(norway)
>
> Your suggestion is really appreciated..

(posting reply on-list, hope that's okay!)

That would be fine for the normal case. It's just possible that the
user will change the computer's clock, which would result in the
serial changing oddly. If that's not a problem to you, the job's done!

ChrisA

[toc] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web