I don’t know how much help I’ll be. It was the first time I’d ever messed with PHP and all I did was change the output. But… it’s not going to work for “Last Post” type of thing. It needs to be put in the loop (i.e. next to the time of the current post) because it reads the date/time stamp of the current post.
Does that make sense?
I’m sure it can be modified pretty easily to do what I think you’re doing, but the way it is currently, it needs to be right there with a post title.
You can look at my page for an example of where I placed it.