011 json time format
This commit is contained in:
+1
-1
@@ -77,7 +77,7 @@
|
|||||||
|
|
||||||
<!--- global settings --->
|
<!--- global settings --->
|
||||||
<cfset request.RECORDS_PER_PAGE=500/>
|
<cfset request.RECORDS_PER_PAGE=500/>
|
||||||
<cfset request.APP_VERSION="0.00.010"/>
|
<cfset request.APP_VERSION="0.00.011"/>
|
||||||
<cfset request.STAND=getStand()/>
|
<cfset request.STAND=getStand()/>
|
||||||
|
|
||||||
<!--- application constants --->
|
<!--- application constants --->
|
||||||
|
|||||||
@@ -20,6 +20,16 @@
|
|||||||
<cfreturn #reReplace(ARGUMENTS.camel,"([A-Z])","_\l\1","ALL")#/>
|
<cfreturn #reReplace(ARGUMENTS.camel,"([A-Z])","_\l\1","ALL")#/>
|
||||||
</cffunction>
|
</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"
|
<cffunction name="query2json"
|
||||||
output="false"
|
output="false"
|
||||||
hint="print query in json format as array of structures">
|
hint="print query in json format as array of structures">
|
||||||
@@ -59,10 +69,10 @@
|
|||||||
/>
|
/>
|
||||||
<cfset out={
|
<cfset out={
|
||||||
"hours"=#hours#,
|
"hours"=#hours#,
|
||||||
"vcdComputingLoadedAt"="#dateFormat(report.qComputingAge.dt_load,'YYYY-MM-DD')# #timeFormat(report.qComputingAge.dt_load,'HH:MM:SS')#",
|
"vcdComputingLoadedAt"="#iso8601dtFormat(report.qComputingAge.dt_load,'YYYY-MM-DD')#",
|
||||||
"vcdStorageLoadedAt"="#dateFormat(report.qStorageAge.dt_load,'YYYY-MM-DD')# #timeFormat(report.qStorageAge.dt_load,'HH:MM:SS')#",
|
"vcdStorageLoadedAt"="#iso8601dtFormat(report.qStorageAge.dt_load,'YYYY-MM-DD')#",
|
||||||
"s3StorageLoadedAt"="#dateFormat(report.qComputingAge.dt_load,'YYYY-MM-DD')# #timeFormat(report.qS3VolAge.dt_load,'HH:MM:SS')#",
|
"s3StorageLoadedAt"="#iso8601dtFormat(report.qComputingAge.dt_load,'YYYY-MM-DD')#",
|
||||||
"s3OpsTrfLoadedAt"="#dateFormat(report.qS3OpsTrfAge.dt_load,'YYYY-MM-DD')# #timeFormat(report.qS3OpsTrfAge.dt_load,'HH:MM:SS')#",
|
"s3OpsTrfLoadedAt"="#iso8601dtFormat(report.qS3OpsTrfAge.dt_load,'YYYY-MM-DD')#",
|
||||||
"records"=#report.qCharge.recordCount#,
|
"records"=#report.qCharge.recordCount#,
|
||||||
"queryDurationMs"=#(getTickCount() - msStartAt)#,
|
"queryDurationMs"=#(getTickCount() - msStartAt)#,
|
||||||
"report"=#report.qCharge.reduce((result, row) => {
|
"report"=#report.qCharge.reduce((result, row) => {
|
||||||
|
|||||||
Reference in New Issue
Block a user