Focal Point Banner


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.


Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [CLOSED] Detecting Daylight Savings Time

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[CLOSED] Detecting Daylight Savings Time
 Login/Join
 
Virtuoso
posted
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, 2003Report This Post
Expert
posted Hide Post
Mickey,

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 Smiler

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, 2004Report This Post
Virtuoso
posted Hide Post
Tony,

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, 2003Report This Post
Guru
posted Hide Post
Would the info in the following link be of use?

http://www.informationbuilders.com/support/developers/timezone.html
 
Posts: 252 | Location: USA | Registered: April 15, 2003Report This Post
Virtuoso
posted Hide Post
jimster06;

I tried this but it doesn't look like it will work for me. REG is not recognized and REGEDIT seems to work differently.

Thanks for the suggestion.


Thanks!

Mickey

FOCUS/WebFOCUS 1990 - 2011
 
Posts: 995 | Location: Gaithersburg, MD, USA | Registered: May 07, 2003Report This Post
Virtuoso
posted Hide Post
To ALL;

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 '@';
END

This message has been edited. Last edited by: mgrackin,


Thanks!

Mickey

FOCUS/WebFOCUS 1990 - 2011
 
Posts: 995 | Location: Gaithersburg, MD, USA | Registered: May 07, 2003Report This Post
Virtuoso
posted Hide Post
Here's a sample FOCEXEC using the EMPDATA database to demonstrate how to use the FUNCTION and the results it gives.

TABLE FILE EMPDATA
PRINT LASTNAME PIN
COMPUTE DST_FLG/A1=DSTIMEYN(HIREDATE);
COMPUTE THEDAY/Wtr=HIREDATE;
COMPUTE THEDOW/W =HIREDATE;
COMPUTE THEDOM/D =HIREDATE;
BY HIREDATE
END


Thanks!

Mickey

FOCUS/WebFOCUS 1990 - 2011
 
Posts: 995 | Location: Gaithersburg, MD, USA | Registered: May 07, 2003Report This Post
Expert
posted Hide Post
Mickey, thanks for the function. I'll give it a try.

By the way, on my Win XP laptop and on our Windows 2003 server, the method described in the Focus on Developers document works wonderfully.

Thanks,

Francis.


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
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Gold member
posted Hide Post
We do this natively in the custom ERP software we provide our customers, including considering historical changes to DST rules.

I have been working with IBI specifyhign an NFR to include natively in WF, especially accessible though IA, in IBI Case# 82502503

If this is something you may be interested in, let your rep know. I can provide details on my case.


WebFOCUS 7.7.04M/8001
Windows Server 2008
Excel, PDF, HTML, AHTML

http://www.plex.com
 
Posts: 73 | Location: Auburn Hills, MI | Registered: September 29, 2011Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [CLOSED] Detecting Daylight Savings Time

Copyright © 1996-2020 Information Builders