[K12OSN] OT: scripting help

Peter Scheie peter at scheie.homedns.org
Tue May 15 22:40:29 UTC 2007


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 at redhat.com
> https://www.redhat.com/mailman/listinfo/k12osn
> For more info see <http://www.k12os.org>
> 




More information about the K12OSN mailing list