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

Discussion in 'Python' started by Morten Engvoldsen, Mar 1, 2013.

  1. 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 <>
    To:
    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 <> 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
     
    Morten Engvoldsen, Mar 1, 2013
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Vytas D.
    Replies:
    0
    Views:
    123
    Vytas D.
    Feb 28, 2013
  2. Morten Engvoldsen
    Replies:
    2
    Views:
    129
    Chris Angelico
    Feb 28, 2013
  3. Matt Jones
    Replies:
    0
    Views:
    135
    Matt Jones
    Feb 28, 2013
  4. Morten Engvoldsen
    Replies:
    1
    Views:
    115
    Rick Johnson
    Feb 28, 2013
  5. Morten Engvoldsen
    Replies:
    0
    Views:
    146
    Morten Engvoldsen
    Feb 28, 2013
Loading...

Share This Page