011 json time format
This commit is contained in:
@@ -20,6 +20,16 @@
|
||||
<cfreturn #reReplace(ARGUMENTS.camel,"([A-Z])","_\l\1","ALL")#/>
|
||||
</cffunction>
|
||||
|
||||
|
||||
<cffunction name="iso8601dtFormat"
|
||||
returntype="string"
|
||||
output="false"
|
||||
hint="formates date and time like this: 2023-12-18T15:41:42.516+0300">
|
||||
<cfargument name="input" required="true" />
|
||||
<cfreturn #dateFormat( input, "yyyy-mm-dd" )#T#timeFormat( input, "HH:mm:ss.lXX" )#/>
|
||||
</cffunction>
|
||||
|
||||
|
||||
<cffunction name="query2json"
|
||||
output="false"
|
||||
hint="print query in json format as array of structures">
|
||||
@@ -59,10 +69,10 @@
|
||||
/>
|
||||
<cfset out={
|
||||
"hours"=#hours#,
|
||||
"vcdComputingLoadedAt"="#dateFormat(report.qComputingAge.dt_load,'YYYY-MM-DD')# #timeFormat(report.qComputingAge.dt_load,'HH:MM:SS')#",
|
||||
"vcdStorageLoadedAt"="#dateFormat(report.qStorageAge.dt_load,'YYYY-MM-DD')# #timeFormat(report.qStorageAge.dt_load,'HH:MM:SS')#",
|
||||
"s3StorageLoadedAt"="#dateFormat(report.qComputingAge.dt_load,'YYYY-MM-DD')# #timeFormat(report.qS3VolAge.dt_load,'HH:MM:SS')#",
|
||||
"s3OpsTrfLoadedAt"="#dateFormat(report.qS3OpsTrfAge.dt_load,'YYYY-MM-DD')# #timeFormat(report.qS3OpsTrfAge.dt_load,'HH:MM:SS')#",
|
||||
"vcdComputingLoadedAt"="#iso8601dtFormat(report.qComputingAge.dt_load,'YYYY-MM-DD')#",
|
||||
"vcdStorageLoadedAt"="#iso8601dtFormat(report.qStorageAge.dt_load,'YYYY-MM-DD')#",
|
||||
"s3StorageLoadedAt"="#iso8601dtFormat(report.qComputingAge.dt_load,'YYYY-MM-DD')#",
|
||||
"s3OpsTrfLoadedAt"="#iso8601dtFormat(report.qS3OpsTrfAge.dt_load,'YYYY-MM-DD')#",
|
||||
"records"=#report.qCharge.recordCount#,
|
||||
"queryDurationMs"=#(getTickCount() - msStartAt)#,
|
||||
"report"=#report.qCharge.reduce((result, row) => {
|
||||
|
||||
Reference in New Issue
Block a user