[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [K12OSN] OT: scripting help



I'm no python wizard, but it seems to me that problem is that strftime is a string formatting method, and you want to add an integer to that string, which doesn't make sense to python. But there might be some other time function you could use in place of that line.

Petre

Peter Hartmann wrote:
I am trying to hack schooltool to export an ical in our timezone
instead of UTC.  I'm hoping that this is trivial....   in icalendar.py
i'm trying to alter this line to add 4 hours.

return value.strftime('%Y%m%dT%H%M%S')

I tried this:

return value.strftime('%Y%m%dT%H+4%M%S')

but in the resluting ical file it gave me this:

DTSTART:20051204T14+40000Z

It printed +4 instead of doing the math.  can this be done on one line?

Thanks,
Peter

_______________________________________________
K12OSN mailing list
K12OSN redhat com
https://www.redhat.com/mailman/listinfo/k12osn
For more info see <http://www.k12os.org>



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]