What time is used in a TOTP counter?
I think this simply comes down to the definition of Unix time, which is given in the Wikipedia article:


  Unix time (also known as POSIX time[1][2] or UNIX Epoch time[3]) is a system for describing a point in time. It is the number of seconds that have elapsed since 00:00:00 Thursday, 1 January 1970,[2] Coordinated Universal Time (UTC), minus leap seconds. Every day is treated as if it contains exactly 86400 seconds,[2] so leap seconds are to be subtracted since the epoch.


Although I would have described it as "without taking leap seconds into account" myself. Generally you should be able to get the Unix time from some time API or old API function, but otherwise (a) seems to be most reasonable. The Wikipedia article also contains ways of converting from different time formats, specifically UTC.