Dekuji dekuji dekuji.<br><br>Pouzival jsem ho, protoze jsem nevedel, ze to de i takhle jednoduse. :)<br><br><div class="gmail_quote">2009/4/4 azurIt <span dir="ltr"><<a href="mailto:azurit@pobox.sk">azurit@pobox.sk</a>></span><br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Ahoj,<br>
<br>
neviem sice preco pouzivas dateutil (a priznam sa, ze ten modul ani nepoznam) avsak taketo nieco vies predsa urobit priamo s datetime:<br>
<div class="im"><br>
>>> start = datetime.datetime(2009, 04, 14, 8, 00)<br>
>>> print start<br>
2009-04-14 08:00:00<br>
</div>>>> end = start + datetime.timedelta(hours=8)<br>
>>> print end<br>
2009-04-14 16:00:00<br>
<br>
<br>
azur<br>
<br>
<br>
-----Pôvodná správa-----<br>
Od: [<a href="mailto:gjaves@gmail.com">gjaves@gmail.com</a>]<br>
Komu: <a href="mailto:python@py.cz">python@py.cz</a><br>
Predmet: [python] dateutil.relativedelta a posunuti casu.<br>
<div><div></div><div class="h5"><br>
Zdravim,<br>
<br>
>>> import datetime<br>
>>> import dateutil<br>
>>> import dateutil.relativedelta<br>
>>> start = datetime.datetime(2009, 04, 14, 8, 00)<br>
>>> print start<br>
2009-04-14 08:00:00<br>
>>> end = start + dateutil.relativedelta.relativedelta(hour=+8)<br>
>>> print end<br>
2009-04-14 08:00:00<br>
>>><br>
<br>
Nemel by mi end vypsat 2009-04-14 16:00:00?<br>
<br>
Diky za Vas cas a upresneni tohoto problemu.<br>
<br>
</div></div>_______________________________________________<br>
Python mailing list<br>
<a href="mailto:Python@py.cz">Python@py.cz</a><br>
<a href="http://www.py.cz/mailman/listinfo/python" target="_blank">http://www.py.cz/mailman/listinfo/python</a><br>
</blockquote></div><br>