The function was created so that the converted date/time would take into account Daylight Savings Time.
Code:
Public Function UnixToStdDateTime(varUnixInput As Variant) As Variant
Dim dteStart As Date, dteEnd As Date
If IsNull(varUnixInput) = False Then
UnixToStdDateTime = DateAdd("s", varUnixInput, #12/31/1969 7:00:00 PM#)
dteStart = DLookup("BeginDST", "tbl_DST", "intYear=" & Year(UnixToStdDateTime))
dteEnd = DLookup("EndDST", "tbl_DST", "intYear=" & Year(UnixToStdDateTime))
If UnixToStdDateTime < dteStart Or UnixToStdDateTime > dteEnd Then
' This date falls outside of daylight savings time. Subtract an hour.
UnixToStdDateTime = DateAdd("h", -1, UnixToStdDateTime)
End If
End If
End Function