Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #24895 > unrolled thread
| Started by | Jason Friedman <jason@powerpull.net> |
|---|---|
| First post | 2012-07-04 22:57 -0600 |
| Last post | 2012-07-04 22:57 -0600 |
| 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.
Re: simpler increment of time values? Jason Friedman <jason@powerpull.net> - 2012-07-04 22:57 -0600
| From | Jason Friedman <jason@powerpull.net> |
|---|---|
| Date | 2012-07-04 22:57 -0600 |
| Subject | Re: simpler increment of time values? |
| Message-ID | <mailman.1810.1341464253.4697.python-list@python.org> |
> Hi all, > I'd like to ask about the possibilities to do some basic manipulation > on timestamps - such as incrementing a given time (hour.minute - > string) by some minutes. > Very basic notion of "time" is assumed, i.e. dateless, > timezone-unaware, DST-less etc. > I first thought, it would be possible to just add a timedelta to a > time object, but, it doesn't seem to be the case. > > The code I came up with (using time and datetime modules) seems rather > convoluted and I would like to ask about some possible more > straightforward alternatives I missed. > The equivalent function (lacking validation) without the (date)time > libraries seems simple enough (for this limited and individual task). > Although it is probably mostly throw-away code, which seems to do what > I need, I'd be interested in better/more elegant... solutions. I have some thoughts on a solution, but first, what is 12:45 plus 12 hours? What is 12:45 minus 13 hours?
Back to top | Article view | comp.lang.python
csiph-web