test: add a test for get_localtime method