convert UnixTime to DateTime

In an RSS feed I only had an UnixTime. For presentation I needed to convert this string to datetime. I did this with this code


DateTime itemDateTime = new DateTime(1970, 1, 1, 0, 0, 0).AddSeconds(item.unixTime);



No idea what it does but it works 😀

Leave a Reply

Your email address will not be published. Required fields are marked *