dcTimeUtil ; 
 ; ----------------------------------------------------------------------------
 ; #
 ; #  DivConq
 ; #
 ; #  http://divconq.com/
 ; #
 ; #  Copyright:
 ; #    Copyright 2012 eTimeline, LLC. All rights reserved.
 ; #
 ; #  License:
 ; #    See the dcLicense.txt file in the project's top-level directory for details.
 ; #
 ; #  Authors:
 ; #    * Andy White
 ; #
 ; ----------------------------------------------------------------------------
 ;
 ; NOW as ISO string (thinks now is in UTC, need to revise TODO)
now(long) n n s n=$h
 ; TODO research how to get ms - add zone offsets?
 i long q $zd(n,"YEARMMDD")_"T"_$zd(n,"2460SS")_"000Z"
 quit $zd(n,"YEARMMDD")_"T"_$zd(n,"2460SS")_"Z"
 ;
 ;
 ; NOW plus days and seconds (thinks now is in UTC, need to revise TODO)
add(days,secs,long) n n s n=$h
 ; TODO research how to get ms - add zone offsets?
 ;
 s:days'="" $p(n,",",1)=$p(n,",",1)+days
 s:secs'="" $p(n,",",2)=$p(n,",",2)+secs
 ;
 i long q $zd(n,"YEARMMDD")_"T"_$zd(n,"2460SS")_"000Z"
 quit $zd(n,"YEARMMDD")_"T"_$zd(n,"2460SS")_"Z"
 ;
 ;
 ; NOW as internal string (thinks now is in UTC, need to revise TODO)
whenNow() n n s n=$h
 ; TODO research how to add zone offsets?
 quit "t5000000"_$zd(n,"YEARMMDD")_$zd(n,"2460SS")
 ;
 ;
