import json import unittest import datetime import utils.date_tool class MyTestCase(unittest.TestCase): def test_dateformat(self): stime = datetime.datetime.now() print(stime) tdate = (2022, 2, 10) sdate = datetime.datetime(tdate[0], tdate[1],tdate[2], 3, 32, 23) sdate = datetime.datetime(stime) print(sdate) if __name__ == '__main__': unittest.main()