diff --git a/p/CCRUTIL.m b/p/CCRUTIL.m index 9f75069..fe24e67 100644 --- a/p/CCRUTIL.m +++ b/p/CCRUTIL.m @@ -35,7 +35,10 @@ FMDTOUTC(DATE,FORMAT) ; Convert Fileman Date to UTC Date Format; PUBLIC; Extrins S OFF=$$TZ^XLFDT ; See Kernel Manual for documentation. ; If H, MM and S are empty, it means that the FM date didn't supply the time. ; In this case, set H, MM and S to "00" - S:('$L(H)&'$L(MM)&'$L(S)) (H,MM,S)="00" + ; S:('$L(H)&'$L(MM)&'$L(S)) (H,MM,S)="00" ; IF ONLY SOME ARE MISSING? + S:'$L(H) H="00" + S:'$L(MM) MM="00" + S:'$L(S) S="00" S UTC=Y_"-"_M_"-"_D_"T"_H_":"_MM_$S(S="":":00",1:":"_S)_OFF ; Skip's code to fix hanging colon if no seconds I $L($G(FORMAT)),FORMAT="DT" Q UTC ; Date with time. E Q $P(UTC,"T")