As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only.
Join the TIBCO Community TIBCO Community is a collaborative space for users to share knowledge and support one another in making the best use of TIBCO products and services. There are several TIBCO WebFOCUS resources in the community.
From the Home page, select Predict: WebFOCUS to view articles, questions, and trending articles.
Select Products from the top navigation bar, scroll, and then select the TIBCO WebFOCUS product page to view product overview, articles, and discussions.
Request access to the private WebFOCUS User Group (login required) to network with fellow members.
Former myibi community members should have received an email on 8/3/22 to activate their user accounts to join the community. Check your Spam folder for the email. Please get in touch with us at community@tibco.com for further assistance. Reference the community FAQ to learn more about the community.
I used this FocalPoint tip Using Reg.exe to Offset Time Zones From a Windows-Based System to determine the number of hours by which I need to offset dates stored in Microsoft CRM tables (they're stored in GMT). Unfortunately, the technique described does not take into account Daylight Savings Time. Based on the tip, to determine the Date-Time in Toronto, the offset is -4 hours. But at the moment, it is actually -5 hours, so it looks like I have to amend the offset by subtracting 1 from it when the run date is during Daylight Savings Time.
Is there a better method of determining if we are in DST than using the WF Date Move functions?This message has been edited. Last edited by: FP Mod Chuck,
Francis
Give me code, or give me retirement. In FOCUS since 1991
Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
From the look of it, it seems to be that DST starts in the second weekend of March and ends in the first weekend of November. That would make it easier to compute the date, wouldn't it?
GamP
- Using AS 8.2.01 on Windows 10 - IE11.
in Focus since 1988
Posts: 1961 | Location: Netherlands | Registered: September 25, 2007
I had to write a DEFINE FUNCTION to use for this because I also have a system that stores dates in GMT. The following code is based on Daylight Savings rules for East Coast USA. Call the function by passing a Smart Date format to it and it returns a Y or N to indicate whether or not the date is in Daylight Savings time of the year.
-*************************************** -* The following function is used to -* determine whether or not a certain -* date is during day light savings time -* or not. -* RETURN FORMAT: A1 (Y or N) -*************************************** DEFINE FUNCTION DSTIMEYN (CURNT_DT/YYMD) CURNT_YR/YY=CURNT_DT; CURNT_MT/M =CURNT_DT; CURNT_DOW/W=CURNT_DT; CURNT_DOM/D=CURNT_DT; CURNT_I_DOW/I1=CURNT_DOW; CURNT_I_DOM/I2=CURNT_DOM; -*************************************** MTH_ID/A4 = IF (CURNT_YR LE '2006') THEN DECODE CURNT_MT( 4 '0604' 10 '0610' ELSE '????') ELSE DECODE CURNT_MT( 3 '0703' 11 '0711' ELSE '????'); -*************************************** -* The following are used for 2006 and prior. -*************************************** APR_ID/A1 = IF (CURNT_I_DOM GE 8) THEN 'Y' ELSE IF (CURNT_I_DOW EQ 7) THEN 'Y' ELSE IF (CURNT_I_DOW EQ CURNT_I_DOM) THEN 'N' ELSE IF (CURNT_I_DOW GT CURNT_I_DOM) THEN 'N' ELSE 'Y'; OCT_ID/A1 = IF (CURNT_I_DOM LE 24) THEN 'Y' ELSE IF (CURNT_I_DOW EQ 7) THEN 'N' ELSE IF (CURNT_I_DOW EQ (CURNT_I_DOM - 24)) THEN 'Y' ELSE IF (CURNT_I_DOW GT (CURNT_I_DOM - 24)) THEN 'Y' ELSE 'N'; -*************************************** -* The following are used for 2007 and beyond. -*************************************** MAR_ID/A1 = IF (CURNT_I_DOM LE 7) THEN 'N' ELSE IF (CURNT_I_DOM GE 15) THEN 'Y' ELSE IF (CURNT_I_DOW EQ 7) THEN 'Y' ELSE IF (CURNT_I_DOW EQ (CURNT_I_DOM - 7)) THEN 'N' ELSE IF (CURNT_I_DOW GT (CURNT_I_DOM - 7)) THEN 'N' ELSE 'Y'; NOV_ID/A1 = IF (CURNT_I_DOM GE 8) THEN 'N' ELSE IF (CURNT_I_DOW EQ 7) THEN 'N' ELSE IF (CURNT_I_DOW EQ CURNT_I_DOM) THEN 'Y' ELSE IF (CURNT_I_DOW GT CURNT_I_DOM) THEN 'Y' ELSE 'N'; -*************************************** DSTIMEYN/A1= IF (CURNT_YR LE '2006') AND (MTH_ID EQ '????') THEN DECODE CURNT_MT(1 N 2 N 3 N 4 ? 5 Y 6 Y 7 Y 8 Y 9 Y 10 ? 11 N 12 N) ELSE IF (CURNT_YR GT '2006') AND (MTH_ID EQ '????') THEN DECODE CURNT_MT(1 N 2 N 3 ? 4 Y 5 Y 6 Y 7 Y 8 Y 9 Y 10 Y 11 ? 12 N) ELSE IF (MTH_ID EQ '0604') THEN APR_ID ELSE IF (MTH_ID EQ '0610') THEN OCT_ID ELSE IF (MTH_ID EQ '0703') THEN MAR_ID ELSE IF (MTH_ID EQ '0711') THEN NOV_ID ELSE '@'; END
Thanks!
Mickey
FOCUS/WebFOCUS 1990 - 2011
Posts: 995 | Location: Gaithersburg, MD, USA | Registered: May 07, 2003
All I can say is Our taxes at work. Someone sent me a link recently that was a congressman commenting on the law requiring the new energy savings light bulbs. What it boils down to is when they burn out or if they break they are hazardous waste. It would do me no good to send it to my congressman and say repeal that stupid law, it was him giving the speech!
Pat WF 7.6.8, AIX, AS400, NT AS400 FOCUS, AIX FOCUS, Oracle, DB2, JDE, Lotus Notes
Posts: 755 | Location: TX | Registered: September 25, 2007
The new light bulbs are hazardous waste! If you break one, you are supposed to get all pets and people out of the room, open a window (how are you going to do that without someone in the room?) use stiff pieces of cardboard to scoop up the residue (I always have some handy) and then use duck tape to pick up any remaining residue. Double bag the waste. The instructions forgot the part about putting on your hazmat suit!
The good news is Home Depot will recyle them for you if they are not broken.
Pat WF 7.6.8, AIX, AS400, NT AS400 FOCUS, AIX FOCUS, Oracle, DB2, JDE, Lotus Notes
Posts: 755 | Location: TX | Registered: September 25, 2007
I received the following email in late MArch regarding these bulbs:
You are being encouraged to replace your incandescent light bulbs with compact fluorescent lamps (CFLs) because they are energy efficient, but are they harmful? The Environmental Protection Agency says that CFLs are safe to use; however, they do contain very small amounts of mercury that may be harmful t if the bulb breaks and the mercury is exposed. So what can you do at home to reduce the risk?
Before cleaning-up the broken CFL have people and pets leave the room without walking through the area where the CFL broke on their way out; shut off the central forced-air heating/air conditioning system, if you have one; and open a window and leave the room yourself for at least 15 minutes.
When clean-up is on a hard surface carefully scoop up glass fragments and powder using stiff paper or cardboard and place them in a glass jar with metal lid (such as a canning jar) or in a sealed plastic bag; use sticky tape, such as duct tape, to pick up any remaining small glass fragments and powder; wipe the area clean with damp paper towels or disposable wipe and place them in the glass jar or plastic bag; and do not use a vacuum or broom to clean up the broken bulb on hard surfaces.
When clean-up is on a carpet or rug carefully pick up glass fragments and place them in a glass jar with metal lid (such as a canning jar) or in a sealed plastic bag; use sticky tape, such as duct tape, to pick up any remaining small glass fragments and powder; only after all visible materials are removed, vacuum the area where the bulb was broken; and remove the vacuum bag (or empty and wipe the canister), and put the bag or vacuum debris in a sealed plastic bag.
When the clean-up is done you should dispose of the clean-up materials immediately by placing them outside your home in a trash container or outdoor protected area and wash your hands after disposing of the jars or plastic bags containing clean-up materials. Check with your local government to find out how to dispose of the broken bulb and clean-up material.
In the future when cleaning the carpet or rug shut off the central forced-air heating/air conditioning system and open a window prior to vacuuming and keep the central heating/air conditioning system shut off and the window open for at least 15 minutes after vacuuming is completed.
Don't know how we got so far off the subject --- but I think I'll stick with the plain old bulbs - sounds like they require a LOT less energy to me!!
Regards,
Darin
In FOCUS since 1991 WF Server: 7.7.04 on Linux and Z/OS, ReportCaster, Self-Service, MRE, Java, Flex Data: DB2/UDB, Adabas, SQL Server Output: HTML,PDF,EXL2K/07, PS, AHTML, Flex WF Client: 77 on Linux w/Tomcat
Posts: 2298 | Location: Salt Lake City, Utah | Registered: February 02, 2007
I hear ya ... I've been more successful than that, they delivered a multi-tenant upload (data segragation) for 8001 to our specifications. It was a multi-month process starting shortly after Summit.
But, I've put a lot of effort into working closely with them: a lot of man hours, documentation and calls from my side.
Even just a few cases expressing support for some native, user-level (that's where I want it) DST support in WF could work. If that seems "a bridge to far", I have ideas and am willing to collaborate on ideas I like with others. Getting multiple customers to document business cases for the same failry narrowly defined NFR can work.
WebFOCUS 7.7.04M/8001 Windows Server 2008 Excel, PDF, HTML, AHTML
Yes, you are right, location and date determine both the applicable time-zone, and the applicability of the DST shift. Date is important, because as you have said Indiana has two timezones, but their application of DST has changed over time, as has the whole of the U.S.
We handle all those intricacies in our ERP and looking for a consistent experience for our users since as a SaaS provider we give them the ERP along the BI functionality of WF.
So, and it took us a few years to get it settled, but we handle all these time zone issues with a few tables (every TZ, the history of it its DST application, a junction table between tenants and their TZ) and then a re-usable function that takes a date and its TZ and converts it to the date in the tenant's TZ.
My proprosal is that TZ be a user attribute, set on either the user form or the user profile. Certain things like &TOD should be handled automatically, but functions like HDIFF should have TZ-enabling parameters or a TZ-aware version of the function.
I have about a half-dozen pages describing my proposal attached to IBI Case #82502503 that I am willing to share and get commentary on.
WebFOCUS 7.7.04M/8001 Windows Server 2008 Excel, PDF, HTML, AHTML