int epoch = (int)(DateTime.UtcNow - new DateTime(1970, 1, 1)).TotalSeconds;
References
https://dzone.com/articles/get-unix-epoch-time-one-line-c
int epoch = (int)(DateTime.UtcNow - new DateTime(1970, 1, 1)).TotalSeconds;
References
https://dzone.com/articles/get-unix-epoch-time-one-line-c