timestring := month+"/"+day+"/"+year+" "+hour+":"+minute+":"+seconds+" GMT";
time := @TextToTime(timestring);
result := @TextToTime(@TimeToTextInZone(time;@GetCurrentTimeZone;"D0T0"));
Lotus Domino / Notes and Java Enterprise in-depth technical insights, notes and nice-to know gems.
7/11/2012
Converting Times to your Servertime in a Nutshell
A quick method to convert UTC DateTime to the current servers local time.
I use this for a rest webservice that accepts UTC/GMT timestamps from an iPhone to make sure all times in the database are in the correct timezone, and still accurate.
This code will go into the "input translation" section triggered by the "compute with form".
7/02/2012
XPages Options for Development in a Team
There are some (new?) interesting options you should know about if you develop with xpages, especially when developing in a team. I just stumbled onto it, and it explains a lot of weird problems with a coworker.
Manually recompile xpages is especially helpful, because if you save your custom control, every dependency is recompiled. If you work on a server and another colleague does something similar, you might be ending up with a big mess of classes that do not match each other, and not even recognize this (and the errors resulting from this are not very helpful, too).
Additionally i found it quite annoying to get the id of labels instead of the actual code, so this is fixed now, too. Joy!
Manually recompile xpages is especially helpful, because if you save your custom control, every dependency is recompiled. If you work on a server and another colleague does something similar, you might be ending up with a big mess of classes that do not match each other, and not even recognize this (and the errors resulting from this are not very helpful, too).
Additionally i found it quite annoying to get the id of labels instead of the actual code, so this is fixed now, too. Joy!
6/27/2012
Logout from your XPage in a Nutshell
Have you ever struggled to provide a quick & easy logout link for your XPage-based web site? There are many JavaScript (both Server-Side and Client-Side) solutions, but this is, what works best for me, and its the simplest, plain solution i could come up with:
Just put "./?logout" in your link text, and you are done!
For convenience, you can easily add "&redirectTo=yourFavouriteSite", or compute that part.
Just put "./?logout" in your link text, and you are done!
For convenience, you can easily add "&redirectTo=yourFavouriteSite", or compute that part.
Subscribe to:
Posts (Atom)