Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > Re: Issue with continous incrementing of unbroken sequence for aentire working day

Reply
Thread Tools

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

 
 
Morten Engvoldsen
Guest
Posts: n/a
 
      03-01-2013
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 <(E-Mail Removed)>
To: http://www.velocityreviews.com/forums/(E-Mail Removed)
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 <(E-Mail Removed)> 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
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: Issue with continous incrementing of unbroken sequence for aentire working day Morten Engvoldsen Python 0 02-28-2013 09:44 PM
Fwd: Issue with continous incrementing of unbroken sequence for aentire working day Morten Engvoldsen Python 1 02-28-2013 09:07 PM
Re: Issue with continous incrementing of unbroken sequence for aentire working day Morten Engvoldsen Python 2 02-28-2013 08:52 PM
Re: Issue with continous incrementing of unbroken sequence for aentire working day Matt Jones Python 0 02-28-2013 07:11 PM
Re: Issue with continous incrementing of unbroken sequence for aentire working day Vytas D. Python 0 02-28-2013 05:43 PM



Advertisments