Can I get a Datetime object from a unix timestamp?
The seconds since (UNIX) epoch relies on a database. 


  New editions of the database and code are published as changes warrant, usually several times per year.


Your options can: 


Reduce the timezone database to the timezone you are actually interested in;
Don't forget about daylight savings time for you specific timezone;
The leap years are well known too and reasonably easy to program; 
The leap seconds are decided upon usually only couple months before they are introduced and therefore cannot be accounted for in an algorithm.


Conclusion


So can you convert epoch to a time/date format? Yes. 
Will it be accurate? It'll drift away over time (months or years)


Advise

If you retrieve epoch from an Internet service, why not use (another?) webserver that has the full timezone database available to convert it to accurate date/time, or 'synchronize' against every once in a while?