Domino Code Fragment

Code Name*
How to Set Time Zone for a Date with the NotesDateTime Class in Notes R4
Date*
04/28/2024
Source (or email address if you prefer)*
Rlatulippe@romac.com
IP address:.3.135.216.174
Description*
Append the time zone after the time.
Type*
LotusScript
Categories*
Date/Time Handling
Implementation:
Required Client:
Server:
Limitations:
Comments:
Files/Graphics attachments (if applicable): Code:
Problem:
When using the NotesDateTime class in Notes R4, how can you set the time zone?


Solution:
Append the time zone after the time. For example to set the time as 12:00:00 AM Greenwich

Mean Time (GMT), the syntax is as follows:

Set dateTime = New NotesDateTime( "4 25 95 12:00:00AM GMT" )
Set item.DateTimeValue = dateTime