An external R library uses the as.character function to convert objects of different classes to strings. That works fine except for my date objects (classes "POSIXlt" and "POSIXt"): Normally the output is like "2010-11-04 10:43:00" (which is perfect) but every time when time is 00:00:00 (midnight) the time component is ommited and only the date component is shown like "2010-11-04". But for further processing I need a consistent output format. So the time component should be displayed in any case.
I can't simply use the format function because the external library does the call. So I thought that overwriting the as.character function for the classes "POSIXlt" and "POSIXt" could be a solution but I don't know how. Other ideas are welcome :)