@@ -1126,7 +1126,7 @@ pub async fn report_generate(
1126
1126
let mut csv = String :: new ( ) ;
1127
1127
1128
1128
//CSV column name header
1129
- let mut headers = "index,type,time,value_msat,value_sat,value_msat_total,value_sat_total,action,sender,app,message,podcast,episode,remote_podcast,remote_episode,custom_key,custom_value" . to_string ( ) ;
1129
+ let mut headers = "index,type,time,timezone, value_msat,value_sat,value_msat_total,value_sat_total,action,sender,app,message,podcast,episode,remote_podcast,remote_episode,custom_key,custom_value" . to_string ( ) ;
1130
1130
1131
1131
if btc_prices. is_some ( ) {
1132
1132
headers. push_str ( ",btc_close,value_usd,value_usd_total" ) ;
@@ -1162,7 +1162,8 @@ pub async fn report_generate(
1162
1162
for boost in boosts {
1163
1163
//Parse out a friendly date
1164
1164
let dt = DateTime :: from_timestamp ( boost. time , 0 ) . unwrap_or_else ( || panic ! ( "Unable to parse boost time: {}" , boost. time) ) ;
1165
- let boost_time = dt. to_rfc3339 ( ) . to_string ( ) ;
1165
+ let boost_time = dt. format ( "%Y-%m-%d %H:%M:%S" ) . to_string ( ) ;
1166
+ let boost_timezone = dt. format ( "%Z" ) . to_string ( ) ;
1166
1167
1167
1168
//Translate to sats
1168
1169
let mut value_sat = 0 ;
@@ -1178,10 +1179,11 @@ pub async fn report_generate(
1178
1179
//The main export data formatting
1179
1180
csv. push_str (
1180
1181
format ! (
1181
- "{},{},\" {}\" ,{},{},{},{},{},\" {}\" ,\" {}\" ,\" {}\" ,\" {}\" ,\" {}\" ,\" {}\" ,\" {}\" ,\" {}\" ,\" {}\" " ,
1182
+ "{},{},\" {}\" ,\" {} \" , {},{},{},{},{},\" {}\" ,\" {}\" ,\" {}\" ,\" {}\" ,\" {}\" ,\" {}\" ,\" {}\" ,\" {}\" ,\" {}\" " ,
1182
1183
boost. index,
1183
1184
list,
1184
1185
boost_time,
1186
+ boost_timezone,
1185
1187
boost. value_msat,
1186
1188
value_sat,
1187
1189
boost. value_msat_total,
@@ -1304,14 +1306,15 @@ pub async fn csv_export_boosts(
1304
1306
let mut csv = String :: new ( ) ;
1305
1307
1306
1308
//CSV column name header
1307
- csv. push_str ( "count,index,time,value_msat,value_sat,value_msat_total,value_sat_total,action,sender,app,message,podcast,episode,remote_podcast,remote_episode,custom_key,custom_value\n " ) ;
1309
+ csv. push_str ( "count,index,time,timezone, value_msat,value_sat,value_msat_total,value_sat_total,action,sender,app,message,podcast,episode,remote_podcast,remote_episode,custom_key,custom_value\n " ) ;
1308
1310
1309
1311
//Iterate the boost set
1310
1312
let mut count: u64 = 1 ;
1311
1313
for boost in boosts {
1312
1314
//Parse out a friendly date
1313
1315
let dt = DateTime :: from_timestamp ( boost. time , 0 ) . unwrap_or_else ( || panic ! ( "Unable to parse boost time: {}" , boost. time) ) ;
1314
- let boost_time = dt. to_rfc3339 ( ) . to_string ( ) ;
1316
+ let boost_time = dt. format ( "%Y-%m-%d %H:%M:%S" ) . to_string ( ) ;
1317
+ let boost_timezone = dt. format ( "%Z" ) . to_string ( ) ;
1315
1318
1316
1319
//Translate to sats
1317
1320
let mut value_sat = 0 ;
@@ -1326,10 +1329,11 @@ pub async fn csv_export_boosts(
1326
1329
//The main export data formatting
1327
1330
csv. push_str (
1328
1331
format ! (
1329
- "{},{},\" {}\" ,{},{},{},{},{},\" {}\" ,\" {}\" ,\" {}\" ,\" {}\" ,\" {}\" ,\" {}\" ,\" {}\" ,\" {}\" ,\" {}\" \n " ,
1332
+ "{},{},\" {}\" ,\" {} \" , {},{},{},{},{},\" {}\" ,\" {}\" ,\" {}\" ,\" {}\" ,\" {}\" ,\" {}\" ,\" {}\" ,\" {}\" ,\" {}\" \n " ,
1330
1333
count,
1331
1334
boost. index,
1332
1335
boost_time,
1336
+ boost_timezone,
1333
1337
boost. value_msat,
1334
1338
value_sat,
1335
1339
boost. value_msat_total,
0 commit comments