Re: Best practise for passing time as arguments

2017-10-14 Thread Christopher Reimer
On Oct 14, 2017, at 10:44 AM, Thomas Jollans wrote: > >> On 14/10/17 19:34, Stefan Ram wrote: >> r...@zedat.fu-berlin.de (Stefan Ram) writes: >>> a post. Use whatever is appropriate in the special case >>> given, or - to write a general library -, learn the design >>> of a good existing library,

Re: Best practise for passing time as arguments

2017-10-14 Thread Chris Angelico
On Sun, Oct 15, 2017 at 8:15 AM, Marko Rauhamaa wrote: > Chris Angelico : > >> * You get into the habit of posting distro-specific (not just >> OS-specific) commands to global mailing lists. > > And? I don't mind you posting the instructions for any other Linux > distro. Chances are the translatio

Re: Best practise for passing time as arguments

2017-10-14 Thread Marko Rauhamaa
Chris Angelico : > * You get into the habit of posting distro-specific (not just > OS-specific) commands to global mailing lists. And? I don't mind you posting the instructions for any other Linux distro. Chances are the translation into my distro is somewhat obvious. At least it would encourage

Re: Best practise for passing time as arguments

2017-10-14 Thread Chris Angelico
On Sun, Oct 15, 2017 at 7:57 AM, Marko Rauhamaa wrote: > Chris Angelico : > >> On Sun, Oct 15, 2017 at 5:20 AM, Marko Rauhamaa wrote: >>> Even better: >>> >>>sudo dnf install python3-pytz >> >> How is that better? It's the same thing, packaged differently, and >> thus only available on Red Ha

Re: Best practise for passing time as arguments

2017-10-14 Thread Marko Rauhamaa
Chris Angelico : > On Sun, Oct 15, 2017 at 5:20 AM, Marko Rauhamaa wrote: >> Even better: >> >>sudo dnf install python3-pytz > > How is that better? It's the same thing, packaged differently, and > thus only available on Red Hat-family systems, and depends on the > update cycle of your OS. U

Re: Best practise for passing time as arguments

2017-10-14 Thread Chris Angelico
On Sun, Oct 15, 2017 at 5:20 AM, Marko Rauhamaa wrote: > Thomas Jollans : > >> When working with time zones, the standard library needs a little help. >> Luckily, there's a module for that. https://pypi.python.org/pypi/pytz > > Even better: > >sudo dnf install python3-pytz How is that better?

Re: Best practise for passing time as arguments

2017-10-14 Thread Marko Rauhamaa
Thomas Jollans : > When working with time zones, the standard library needs a little help. > Luckily, there's a module for that. https://pypi.python.org/pypi/pytz Even better: sudo dnf install python3-pytz Marko -- https://mail.python.org/mailman/listinfo/python-list

Re: Best practise for passing time as arguments

2017-10-14 Thread Marko Rauhamaa
r...@zedat.fu-berlin.de (Stefan Ram): > Of course, you (the OP), should check out > > datetime.datetime > > and > > datetime.timedelta > > from the Python Library. which he mentioned in his post. Marko -- https://mail.python.org/mailman/listinfo/python-list

Re: Best practise for passing time as arguments

2017-10-14 Thread Thomas Jollans
On 14/10/17 19:34, Stefan Ram wrote: > r...@zedat.fu-berlin.de (Stefan Ram) writes: >> a post. Use whatever is appropriate in the special case >> given, or - to write a general library -, learn the design >> of a good existing library, like Time4J, first. > > Though in many cases, an ISO 8601 ti

Re: Best practise for passing time as arguments

2017-10-14 Thread Marko Rauhamaa
Andrew Z : > I wonder what are the "best practises" for passing "time" parameters to > functions? > I noticed that sometimes i pass "time" as a str and then start "massaging" > it into delta or i need this time format or that format. Thats quite > annoying and inconsistent. I do the same thing.