diff --git a/reframe/core/runtime.py b/reframe/core/runtime.py
index 8048876f..9ff0db00 100644
--- a/reframe/core/runtime.py
+++ b/reframe/core/runtime.py
@@ -9,7 +9,7 @@
 
 import os
 import functools
-from datetime import datetime
+import time
 
 import reframe.core.config as config
 import reframe.utility.osext as osext
@@ -31,7 +31,7 @@ class RuntimeContext:
         self._site_config = site_config
         self._system = System.create(site_config)
         self._current_run = 0
-        self._timestamp = datetime.now()
+        self._timestamp = time.localtime()
 
     def _makedir(self, *dirs, wipeout=False):
         ret = os.path.join(*dirs)
@@ -111,7 +111,7 @@ class RuntimeContext:
     @property
     def timestamp(self):
         timefmt = self.site_config.get('general/0/timestamp_dirs')
-        return self._timestamp.strftime(timefmt)
+        return time.strftime(timefmt, self._timestamp)
 
     @property
     def output_prefix(self):
diff --git a/reframe/frontend/cli.py b/reframe/frontend/cli.py
index b3ea5af7..e0ed7da3 100644
--- a/reframe/frontend/cli.py
+++ b/reframe/frontend/cli.py
@@ -286,7 +286,7 @@ def main():
         envvar='RFM_SAVE_LOG_FILES', configvar='general/save_log_files'
     )
     output_options.add_argument(
-        '--timestamp', action='store', nargs='?', const='%FT%T',
+        '--timestamp', action='store', nargs='?', const='%y%m%dT%H%M%S%z',
         metavar='TIMEFMT',
         help=('Append a timestamp to the output and stage directory prefixes '
               '(default: "%%FT%%T")'),

diff --git a/unittests/test_cli.py b/unittests/test_cli.py
index d2e9589e..14ba5fc5 100644
--- a/unittests/test_cli.py
+++ b/unittests/test_cli.py
@@ -553,14 +553,17 @@ def test_timestamp_option(run_reframe):
 
 
 def test_timestamp_option_default(run_reframe):
-    timefmt_date_part = time.strftime('%FT')
     returncode, stdout, _ = run_reframe(
         checkpath=['unittests/resources/checks'],
         action='list',
         more_options=['-R', '--timestamp']
     )
     assert returncode == 0
-    assert timefmt_date_part in stdout
+
+    matches = re.findall(
+        r'(stage|output) directory: .*\/(\d{6}T\d{6}\+\d{4})', stdout
+    )
+    assert len(matches) == 2
 
 
 def test_list_empty_prgenvs_check_and_options(run_reframe):

Update the default `--timestamp` value so as not to use `:`
The paths containing colons are problematic for CMake and Bash's autocompletion does not like them either. It seems that we can still have an [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) compliant default timestamp without dashes and colons: `20230422T151055` instead of the current `2023-04-22T15:10:55`
unittests/test_cli.py::test_timestamp_option_default
unittests/test_cli.py::test_check_success[run] unittests/test_cli.py::test_check_success[dry_run] unittests/test_cli.py::test_check_restore_session_failed unittests/test_cli.py::test_check_restore_session_succeeded_test unittests/test_cli.py::test_check_restore_session_check_search_path unittests/test_cli.py::test_check_success_force_local[run] unittests/test_cli.py::test_check_success_force_local[dry_run] unittests/test_cli.py::test_report_file_with_sessionid[run] unittests/test_cli.py::test_report_file_with_sessionid[dry_run] unittests/test_cli.py::test_report_ends_with_newline[run] unittests/test_cli.py::test_report_ends_with_newline[dry_run] unittests/test_cli.py::test_report_file_symlink_latest[run] unittests/test_cli.py::test_report_file_symlink_latest[dry_run] unittests/test_cli.py::test_check_failure unittests/test_cli.py::test_check_setup_failure unittests/test_cli.py::test_check_kbd_interrupt unittests/test_cli.py::test_check_sanity_failure[run] unittests/test_cli.py::test_check_sanity_failure[dry_run] unittests/test_cli.py::test_dont_restage unittests/test_cli.py::test_checkpath_symlink unittests/test_cli.py::test_performance_check_failure[run] unittests/test_cli.py::test_performance_check_failure[dry_run] unittests/test_cli.py::test_perflogdir_from_env unittests/test_cli.py::test_performance_report[run] unittests/test_cli.py::test_performance_report[dry_run] unittests/test_cli.py::test_skip_system_check_option[run] unittests/test_cli.py::test_skip_system_check_option[dry_run] unittests/test_cli.py::test_skip_prgenv_check_option[run] unittests/test_cli.py::test_skip_prgenv_check_option[dry_run] unittests/test_cli.py::test_sanity_of_checks unittests/test_cli.py::test_unknown_system unittests/test_cli.py::test_sanity_of_optconfig unittests/test_cli.py::test_checkpath_recursion unittests/test_cli.py::test_same_output_stage_dir unittests/test_cli.py::test_execution_modes[run] unittests/test_cli.py::test_execution_modes[dry_run] unittests/test_cli.py::test_invalid_mode_warning unittests/test_cli.py::test_timestamp_option unittests/test_cli.py::test_list_empty_prgenvs_check_and_options unittests/test_cli.py::test_list_check_with_empty_prgenvs unittests/test_cli.py::test_list_empty_prgenvs_in_check_and_options unittests/test_cli.py::test_list_with_details unittests/test_cli.py::test_list_concretized unittests/test_cli.py::test_list_tags unittests/test_cli.py::test_list_tests_with_deps unittests/test_cli.py::test_list_tests_with_fixtures unittests/test_cli.py::test_filtering_multiple_criteria_name unittests/test_cli.py::test_filtering_multiple_criteria_hash unittests/test_cli.py::test_filtering_exclude_hash unittests/test_cli.py::test_show_config_all unittests/test_cli.py::test_show_config_param unittests/test_cli.py::test_show_config_unknown_param unittests/test_cli.py::test_show_config_null_param unittests/test_cli.py::test_verbosity unittests/test_cli.py::test_verbosity_with_check unittests/test_cli.py::test_quiesce_with_check unittests/test_cli.py::test_failure_stats[run] unittests/test_cli.py::test_failure_stats[dry_run] unittests/test_cli.py::test_maxfail_option unittests/test_cli.py::test_maxfail_invalid_option unittests/test_cli.py::test_maxfail_negative unittests/test_cli.py::test_repeat_option[run] unittests/test_cli.py::test_repeat_option[dry_run] unittests/test_cli.py::test_repeat_invalid_option unittests/test_cli.py::test_repeat_negative unittests/test_cli.py::test_parameterize_tests unittests/test_cli.py::test_parameterize_tests_invalid_params unittests/test_cli.py::test_reruns_negative unittests/test_cli.py::test_reruns_with_duration unittests/test_cli.py::test_exec_order[name] unittests/test_cli.py::test_exec_order[rname] unittests/test_cli.py::test_exec_order[uid] unittests/test_cli.py::test_exec_order[ruid] unittests/test_cli.py::test_exec_order[random] unittests/test_cli.py::test_detect_host_topology unittests/test_cli.py::test_detect_host_topology_file unittests/test_cli.py::test_external_vars[run] unittests/test_cli.py::test_external_vars[dry_run] unittests/test_cli.py::test_external_vars_invalid_expr[run] unittests/test_cli.py::test_external_vars_invalid_expr[dry_run] unittests/test_cli.py::test_fixture_registry_env_sys unittests/test_cli.py::test_fixture_resolution[run] unittests/test_cli.py::test_fixture_resolution[dry_run] unittests/test_cli.py::test_dynamic_tests[run] unittests/test_cli.py::test_dynamic_tests[dry_run] unittests/test_cli.py::test_dynamic_tests_filtering[run] unittests/test_cli.py::test_dynamic_tests_filtering[dry_run] unittests/test_cli.py::test_testlib_inherit_fixture_in_different_files