diff --git a/src/g5505_utils.py b/src/g5505_utils.py index 401c3d0..fda1bbb 100644 --- a/src/g5505_utils.py +++ b/src/g5505_utils.py @@ -101,16 +101,12 @@ def make_file_copy(source_file_path, output_folder_name : str = 'tmp_files'): return tmp_file_path def created_at(): - now = datetime.datetime.now() - # Populate now object with time zone infotmation obtained from the local system + # Populate now object with time zone information obtained from the local system now_tz_aware = now.astimezone() tz = now_tz_aware.strftime('%z') - #created_at = now_tz_aware.strftime('%Y-%m-%d_%H-%M-%S')+'_utcoffset_' + tz - #created_at = now_tz_aware.strftime('%Y-%m-%d')+'_UTC-OFST_' + tz - created_at = now_tz_aware.strftime('%Y-%m-%d %H:%M:%S') +'_UTC-OFST_' + tz - # Make created at timestamp with tz information - #created_at = now.isoformat() + # Replace colons in the time part of the timestamp with hyphens to make it file name friendly + created_at = now_tz_aware.strftime('%Y-%m-%d_%H-%M-%S') + '_UTC-OFST_' + tz return created_at def dataframe_to_np_structured_array(df: pd.DataFrame):