diff --git a/llm/default_plugins/openai_models.py b/llm/default_plugins/openai_models.py index f5428bd..4ec7230 100644 --- a/llm/default_plugins/openai_models.py +++ b/llm/default_plugins/openai_models.py @@ -46,7 +46,7 @@ def register_commands(cli): to_print = [] for model in models: # Print id, owned_by, root, created as ISO 8601 - created_str = datetime.datetime.fromtimestamp( + created_str = datetime.datetime.utcfromtimestamp( model["created"] ).isoformat() to_print.append( diff --git a/tests/test_cli_openai_models.py b/tests/test_cli_openai_models.py index 0a1428c..fd5ff07 100644 --- a/tests/test_cli_openai_models.py +++ b/tests/test_cli_openai_models.py @@ -34,6 +34,6 @@ def test_openai_models(mocked_models): assert result.exit_code == 0 assert result.output == ( "id owned_by created \n" - "ada:2020-05-03 openai 2020-05-03T13:26:40\n" - "babbage:2020-05-03 openai 2020-05-03T13:26:40\n" + "ada:2020-05-03 openai 2020-05-03T20:26:40\n" + "babbage:2020-05-03 openai 2020-05-03T20:26:40\n" )