Read the whole Time thread. I've seen code to do what you want . In Liudr's Phi Prompt there is something similar to what you want to do and there are Many others that I've seen. I would be happy to give you a copy of a sketch that works with the GPS data and you can do what you wish. Let me know and I'll post it.
Bob