In most data acquisition settings it is useful to tag your data with time and location. If I write the data to csv file, what are the best formats that I can use for this two variables if I want to create a heatmap on Google Maps? 
Best format for recording time stamp and GPS
data formats;geospatial
As Spacedman put it, best is pretty subjective. However, as we have found, a good format for time is Unix time (aka POSIX time, aka Epoch time). Most databases support it and it is still pretty human readable.For location, we like decimal degrees as it is easy to read and stored and is compatible with Google Maps API. It's also easy to convert to other formats if needed.