change strftime formatting of timestamp to epoch seconds

This commit is contained in:
tony 2025-01-11 10:29:51 -07:00
parent 0cf405a5e1
commit 30c55e7bc0
2 changed files with 2 additions and 1 deletions

View File

@ -4,3 +4,4 @@ from datetime import datetime
data_dict = pd.read_pickle("saved_data_dict.pkl")
data_df = pd.DataFrame(data_dict)
data_df.T.to_csv("data_df.csv")
print(datetime.now().strftime("%s"))

View File

@ -55,6 +55,6 @@ datum_dict['lghtng_date'] = lightning_dict['date']
datum_dict['lghtng_time'] = lightning_dict['timestamp']
datum_dict['lghtng_scnt'] = lightning_dict['count']
datum_dict['lghtng_batt'] = lightning_dict['battery']
data_dict[datetime.now().strftime('%Y%m%d-%H%M%S')] = datum_dict
data_dict[datetime.now().strftime('%s')] = datum_dict
with open('saved_data_dict.pkl', 'wb') as f:
pickle.dump(data_dict, f)