Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #33642
| Date | 2012-11-20 12:16 -0600 |
|---|---|
| From | Tim Chase <python.list@tim.thechases.com> |
| Subject | Re: Printing time in "at" format? |
| References | <k8gagp$gin$1@panix2.panix.com> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.76.1353435321.29569.python-list@python.org> (permalink) |
On 11/20/12 10:18, Roy Smith wrote: > I need to talk to an API which requires (for reasons totally beyond my > comprehension), time specified in "at" format, i.e. the format > accepted by the unix "at" command. This allows you to do such bizarre > things as use "teatime" to indicate 4:00 PM. The best I can find for > a specification is http://tinyurl.com/d5vddoa. > > Before I dive into this too far, has anybody already written some code > which formats times like that? Your statement can be ambiguously parsed as "I need to merely *generate* time specifications that 'at' can parse", or it can be parsed as "I need to generate *and consume* time specifications the same way as 'at' does" If it's the former, it's pretty easy--'at' accepts a wide variety of formats. If it's the latter, I've got a doc in /usr/share/doc/at/timespec on my Debian machine, which seems to be googleable, but here's one copy of it http://fts.ifac.cnr.it/cgi-bin/dwww/usr/share/doc/at/timespec I don't have a parser already, but that should get you a jump start on what (at least Debian's) 'at' parses, and might tie nicely with pyparsing. -tkc
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Printing time in "at" format? roy@panix.com (Roy Smith) - 2012-11-20 11:18 -0500 Re: Printing time in "at" format? Tim Chase <python.list@tim.thechases.com> - 2012-11-20 12:16 -0600 Re: Printing time in "at" format? Roy Smith <roy@panix.com> - 2012-11-20 13:24 -0500 Re: Printing time in "at" format? Hans Mulder <hansmu@xs4all.nl> - 2012-11-21 13:14 +0100
csiph-web