What time is used in a TOTP counter? I am currently working on a desktop TOTP client.

From the TOTP spec at https://tools.ietf.org/html/rfc6238#section-4.1, the 6 digit  OTP is generated from counter (in this case time).

But what is "time"? The spec says that the time is in the format of a Unix time epoch (seconds that have elapsed since Jan 01 1970).

My question is, 

What how do I compute this Unix time?


a) Do I get UTC time &amp; convert it to Unix time epochs? 
b) Do I get local time &amp; convert it to Unix time epochs?


or


c) Converting both UTC &amp; local time to Unix time gives the same value so it will not matter?
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.