datatype class %Library.UTC extends %DataType



Parameters Properties Methods Queries Indices ForeignKeys Triggers


Compare ConvertHorologToTimeStamp ConvertLocaltoUTC ConvertTimeStampToHorolog
ConvertUTCtoLocal Diff DisplayToLogical IsValid
LogicalToDisplay LogicalToOdbc Normalize NowLocal
NowUTC OdbcToLogical SecondsSinceCOSEpoch SecondsSinceUnixEpoch
SecondsSinceWin32Epoch StorageToLogical Win32EpochFILETIME Win32EpochFILETIMEtoLocalH


classmethod Compare(%t1 As %TimeStamp, %t2 As %TimeStamp) as %Integer
Compare two timestamps, return 0 if euqal, >0 if %t1 is later, <0 if %t2 is later
classmethod ConvertHorologToTimeStamp(%horolog As %String) as %TimeStamp
Convert horolog to timstamp value
classmethod ConvertLocaltoUTC(%timestamp As %TimeStamp) as %TimeStamp
Convert local timestamp to UTC timestamp
classmethod ConvertTimeStampToHorolog(%timestamp As %TimeStamp) as %String
Convert timstamp to horolog value
classmethod ConvertUTCtoLocal(%timestamp As %TimeStamp) as %TimeStamp
Convert UTC timestamp to local timestamp
classmethod Diff(%later As %TimeStamp, %earlier As %TimeStamp) as %Integer
Return the number of seconds difference between two timestamps. if '%later' is earlier than '%earlier' then the result is a negative number.
classmethod DisplayToLogical(%val As %TimeStamp) as %TimeStamp
classmethod LogicalToDisplay(%val As %TimeStamp) as %TimeStamp
classmethod LogicalToOdbc(%val As %TimeStamp) as %TimeStamp
classmethod Normalize(%val As %CacheString) as %TimeStamp
Strip off trailing zeros and trailing dot for normalized form
classmethod NowLocal() as %TimeStamp
Return the current local timestamp
classmethod NowUTC() as %TimeStamp
Return the current UTC timestamp
classmethod OdbcToLogical(%val As %TimeStamp) as %TimeStamp
classmethod SecondsSinceCOSEpoch(TimeStamp As %String = $ztimestamp) as %Integer
Seconds since Dec 31, 1840. Minimum timestamp="0,0"
classmethod SecondsSinceUnixEpoch(TimeStamp As %String = $ztimestamp) as %Integer
Seconds since Jan 1 1970. Minimum timestamp="47117,0"
classmethod SecondsSinceWin32Epoch(TimeStamp As %String = $ztimestamp) as %Integer
Seconds since Jan 1 1601. Minimum timestamp="0,0"
classmethod StorageToLogical(%val As %TimeStamp) as %TimeStamp
classmethod Win32EpochFILETIME(TimeStamp As %String = $ztimestamp) as %Integer
100-nanoseconds since Jan 1 1601. Matches Windows FILETIME. Minimum timestamp="0,0"
classmethod Win32EpochFILETIMEtoLocalH(Win32EpochFILETIME As %String) as %TimeStamp
Converts a Windows FILETIME value to a $H value. Minimum FILETIME=75735648000000000 = 12/31/1840 = "0,0"
Copyright © 1997-2020 InterSystems Corporation, Cambridge, MA