Reputation: 20224
I have a Lotus Domino server sitting in CET/CEDT.
An email on that server has a DeliveredDate, maybe in the same time zone, maybe not, but let's have it set to 2014-03-01 11:01:38 CET
.
Second thing I have is some "canonical time zone string" of another timezone, let's say Z=-4$DO=0$...$ZN=Arabian
How can I get - in a LotusScript ServerTask - the DeliveredDate converted to the time zone represented by aforementioned time zone string?
If some LotusScript servertask puts that date into a NotesDateTime
object, I can get the properties LSLocalTime
, which is CET, LSGMTTime
, which is GMT, and ZoneTime
, which of course also returns CET. Functions include ConvertToZone
, which does not take a string, and the undocumented merge
, which changes the time, such that 11:01 CET becomes 11:01 AST (8:01 CET).
But a delivered date of 2014-03-01 11:01 CET should become 2014-03-01 14:01 AST;
and a delivered date of 2014-04-01 11:01 CEDT should become 2014-04-01 13:01 AST.
How?
Upvotes: 0
Views: 2177
Reputation: 1320
Notes formula language has a function that does exactly what you want. It's called @TimeToTextInZone
. According to this developerWorks thread, there is no equivalent in LotusScript. However, you could try using NotesSession.Evaluate()
combined with @TimeToTextInZone
.
Upvotes: 1
Reputation: 720
It looks like that string contains the values for the zone and dst arguments to ConvertToZone, so you can just parse it and use that method, right? Am I missing something?
Upvotes: 0