Fixed bug where now() returned shared t instead of local result

Also optimized the implementation following some of @MirkoFerrati suggestions