Method: GetLocalTime for UsiTimeDisp
- Updated2024-09-12
- 1 minute(s) read
DataPlugin > Methods > Method: GetLocalTime for UsiTimeDisp
Method: GetLocalTime for UsiTimeDisp
Returns the time information saved in the USITimeDisp object as local time. The local time consists of a date and time specification.
The GetLocalTime method does not execute a plausibility check and assumes that the time information to be converted is in UTC time. If this is not the case, the results are invalid. Therefore we recommend you know how local time is related to UTC time when you use this method. For example, UTC + 1 hour applies in Germany, which means 1 p. m. UTC is the same as 2 p.m. local time. During the daylight saving time, Germany adds a further hour to the UTC time.
Set oUsiTimeDisp = Object.GetLocalTime
| Object | UsiTimeDisp Object with this method |
| oUsiTimeDisp | UsiTimeDisp Returned object |
The following example generates the time information 25.04.2014 14:35:00 and then outputs the local time:
Dim UTC: Set UTC = CreateTime(2014,4,25,14,35,10) Dim LocalTime: Set LocalTime = UTC.GetLocalTime() Call MsgBoxDisp(LocalTime.Hour & ":" & LocalTime.Minute & ":" & LocalTime.Second)