View, Column, JavaScript

Hi GuysI need to get the current time zone of the client like (ZEB5) and store it in view column for all documents, is this possible?

Subject: I need more information about client, purpose etc. to answer your question.

please give more details…

Is it a notes-klient or a browser client

Do you want to show the ZEB5 code in the column or/and in the document (save)… and what will you use it for…

ZoomTek.dk

http://www.zoomtek.dk

Subject: RE: I need more information about client, purpose etc. to answer your question.

Hi,

Its for the Web, Im looking this for, to give you a background. I have an applcation that sits in US Server, My clients use browser client to connect to my server and my application and create calendar docuemnts. Now when they save it, the document appears to be with Server Time and Server Time Zone. My users want to save the document with users time zone. LikeL If a user connects from India, the document should be saved with India Meeting Time and Indian Zone. After saving this document if a person from Singapore views it, It should convert to Singapore time Zone.

I tried writing the coversion function it works fine. But the problem is how do i get the client Time Zone in the view. Thats a hell problem.

Let me know if there is any simple method to do it

snarasoft1@yahoo.com

Subject: View, Column, JavaScript

It is not possible, but you can get close.In JavaScript, create a Date object. Use its getTimezoneOffset method to get the browser’s offset from UTC. Pass this back to the server.

On the server, create a NotesDateTime object. Use ConvertToZone to set the zone using the offset that you got from the browser. Remember that Notes zones are different from offsets. For example, the offset GMT +0530 is Notes zone -3005. Use the ZoneTime property to get the date/time as a String. The last part of the String is the Notes zone name, like “ZE5B”. Store this in the document, and display it in the view.

This method fails where daylight saving time is in use. For example, in the UK the zone is now GDT, but this method will display CET. I do not know any way to fix this problem in all cases.

This method also fails if the user’s browser has bugs, or if the settings in the user’s machine are wrong.

Subject: RE: View, Column, JavaScript

Hi, Rod,

I was trying this for a long time now, I tried finding your documents too for solution before and wanted to mail you on this, any way i have done some thing neat that gives me the result,

What i do is this, While creating the C&S doc on the web, on load of the form i call a function in JS that gets the Date, hr, minute, sec and timezone value and add them up in one field and save it with the document, Remember the timezone field* is in OS format, So I write another function in JS that converts to Lotus Notes Time/Date format and store only this value in another field.

What i have got now is The user Created Meeting Date&Time and His local Time Zone. After the doc is created Write an agent to convert this to date field with his local time zone and show in the view.

Second. When other users see it in there view, what is do is on the $$VTD form i have the same function to get his client timezone, again i store this in a field in $$VTD and use d.w to populate in a column level, The write a function to compare the document created timezone and the current users time zone get the number of hours difference in west or east and add or subract this hour portion to the actual meeting time.

:wink:

Does this make sense?

Anyway let me know, and let me know you id, so i can mail u detailed on this if needed.

satya

Subject: RE: View, Column, JavaScript

How do you get the timezone value in JavaScript? The offset is not enough. You need the real time zone.There is no need to send e-mail about this. The forum is a good place to discuss it. If you really need to send me e-mail for some reason, my address is in my profile – it always has been.