Make function independent of server's timezone