The following property has been added to the DominoDateTime class to allow a date/time value to be represented in a format consistent with ISO 8601's Universal Time (UTC). This will be available as part of beta 0.4 later coming this month.
'/**
' * ISO Coordinated Universal Time (UTC) format for date
' */
Property Get UTC As String
Dim UTCDayName As String
Dim UTCDay As String
Dim UTCMonth As String
Dim UTCYear As String
Dim UTCTime As String
Dim UTCSign As String
Dim UTCZone As String
If iDate Is Nothing Then Exit Property
UTCDayName$ = Format$(iDate.LSLocalTime, "ddd")
UTCDay$= Format$(iDate.LSLocalTime, "dd")
UTCMonth$ = Format$(iDate.LSLocalTime, "mmm")
UTCYear$ = Format$(iDate.LSLocalTime, "yyyy")
UTCTime$ = Format$(iDate.LSLocalTime, "hh:nn:ss")
If Sgn(iDate.TimeZone) < 0 Then UTCSign$ = "-" Else UTCSign$ = "+"
If iDate.TimeZone < 10 Then UTCZone$ = "0" + Cstr(Abs(iDate.TimeZone)) Else UTCZone$ = Cstr(Abs(iDate.TimeZone))
UTCZone$ = UTCSign$ + UTCZone$ + "00"
UTC$ = UTCDayName$ + ", " + UTCDay$ + " " +UTCMonth$+ " " +UTCYear$ + " " +UTCTime$ + " " + UTCZone$
End Property
Comments (0)