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.
Is there a way to detect whether or not we are currently under day light savings time or under standard time? Is there some flag in FOCUS that can be checked to determine this? If not, is there some equation that I can use in a DEFINE or -SET to determine this?
Thanks!This message has been edited. Last edited by: Kerry,
Thanks!
Mickey
FOCUS/WebFOCUS 1990 - 2011
Posts: 995 | Location: Gaithersburg, MD, USA | Registered: May 07, 2003
Check out this link and search for "North America" within the page (near the bottom) for some useful info on when DST starts and ends for USA. Note that it's changing from 2007
T
In FOCUS since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2
WebFOCUS App Studio 8.2.06 standalone on Windows 10
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004
Thanks for the link. This looks like it gives me what I need. I was hoping for a FOCUS ENV variable that would tell me but I guess this will have to do. This sounds like a New Feature Request.
Thanks!
Thanks!
Mickey
FOCUS/WebFOCUS 1990 - 2011
Posts: 995 | Location: Gaithersburg, MD, USA | Registered: May 07, 2003
You might not like this but here is the first version of a DEFINE FUNCTION I created to determine if the date is during daylight savings time or not. This is based on the rules for North America at the web site Tony posted.
-*************************************** 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 '@'; ENDThis message has been edited. Last edited by: mgrackin,
Thanks!
Mickey
FOCUS/WebFOCUS 1990 - 2011
Posts: 995 | Location: Gaithersburg, MD, USA | Registered: May 07, 2003