time change for daylight savings

william giannelli

time change for daylight savings

what effect does falling back one hour have on DB2 for daylight savings?

our z/OS folks wait one hour before starting our systems. do we need to do that? also if they dynamically change the time, should we bring db2 down first?

thanks

Bill

Philip Sevetson

time change for daylight savings
(in response to william giannelli)
**please note my email address change**
Bill,

DB2’s internal time/date counter runs on GMT/Zulu, if I recall correctly. That is not affected by DST rules anywhere. Your local representation of it (display, not storage) should be what changes. You won’t need to restart DB2 for the change to take effect; the offset from GMT should change automatically.

Dan? Terry? Patrick? Affirmation/contradiction?

Philip Sevetson
Computer Systems Manager
5 Manhattan West (33rd St at 10th Ave)
New York, NY 10001-2632
212-857-1688 w
917-991-7052 c
212-857-1659 f
[cid:[login to unmask email]

From: william giannelli [mailto:[login to unmask email]
Sent: Monday, November 06, 2017 8:47 AM
To: [login to unmask email]
Subject: [DB2-L] - time change for daylight savings


what effect does falling back one hour have on DB2 for daylight savings?

our z/OS folks wait one hour before starting our systems. do we need to do that? also if they dynamically change the time, should we bring db2 down first?

thanks

Bill

-----End Original Message-----
**This e-mail, including any attachments, may be confidential, privileged, or otherwise legally protected. It is intended only for the addressee. If you received this e-mail in error or from someone who was not authorized to send it to you, do not disseminate, copy, or otherwise use this e-mail or its attachments. Please notify the sender immediately by reply e-mail and delete the e-mail from your system.**
Attachments

  • image001.png (3.3k)

Philip Sevetson

time change for daylight savings
(in response to Philip Sevetson)
**please note my email address change**
I’m trying to produce a demonstrative test, but I’m floundering trying to compute the number of hours between two created timestamp fields. Does anyone have a working example of computing the difference between two timestamps, and showing the result in some meaningful format (such as, number of years/months/days/hours/whatever)?

Philip Sevetson
Computer Systems Manager
5 Manhattan West (33rd St at 10th Ave)
New York, NY 10001-2632
212-857-1688 w
917-991-7052 c
212-857-1659 f
[cid:[login to unmask email]

From: Sevetson, Phil [mailto:[login to unmask email]
Sent: Monday, November 06, 2017 9:07 AM
To: '[login to unmask email]'
Subject: [DB2-L] - RE: time change for daylight savings

**please note my email address change**
Bill,

DB2’s internal time/date counter runs on GMT/Zulu, if I recall correctly. That is not affected by DST rules anywhere. Your local representation of it (display, not storage) should be what changes. You won’t need to restart DB2 for the change to take effect; the offset from GMT should change automatically.

Dan? Terry? Patrick? Affirmation/contradiction?

Philip Sevetson
Computer Systems Manager
5 Manhattan West (33rd St at 10th Ave)
New York, NY 10001-2632
212-857-1688 w
917-991-7052 c
212-857-1659 f
[cid:[login to unmask email]

From: william giannelli [mailto:[login to unmask email]
Sent: Monday, November 06, 2017 8:47 AM
To: [login to unmask email]<mailto:[login to unmask email]>
Subject: [DB2-L] - time change for daylight savings


what effect does falling back one hour have on DB2 for daylight savings?

our z/OS folks wait one hour before starting our systems. do we need to do that? also if they dynamically change the time, should we bring db2 down first?

thanks

Bill

-----End Original Message-----
**This e-mail, including any attachments, may be confidential, privileged, or otherwise legally protected. It is intended only for the addressee. If you received this e-mail in error or from someone who was not authorized to send it to you, do not disseminate, copy, or otherwise use this e-mail or its attachments. Please notify the sender immediately by reply e-mail and delete the e-mail from your system.**
-----End Original Message-----
**This e-mail, including any attachments, may be confidential, privileged, or otherwise legally protected. It is intended only for the addressee. If you received this e-mail in error or from someone who was not authorized to send it to you, do not disseminate, copy, or otherwise use this e-mail or its attachments. Please notify the sender immediately by reply e-mail and delete the e-mail from your system.**
Attachments

  • image001.png (3.3k)

Roy Boxwell

time change for daylight savings
(in response to Philip Sevetson)
Unless that red alert bit you....

Roy Boxwell

SOFTWARE ENGINEERING GMBH and SEGUS Inc.
-Product Development-

Heinrichstrasse 83-85
40239 Duesseldorf/Germany
Tel. +49 (0)211 96149-675
Fax +49 (0)211 96149-32
Email: [login to unmask email]<mailto:[login to unmask email]>
http://www.seg.de http://www.seg.de

Software Engineering GmbH
Amtsgericht Düsseldorf, HRB 37894
Geschäftsführung: Gerhard Schubert, Bettina Schubert

From: Sevetson, Phil [mailto:[login to unmask email]
Sent: Monday, November 6, 2017 3:07 PM
To: '[login to unmask email]' <[login to unmask email]>
Subject: [DB2-L] - RE: time change for daylight savings

**please note my email address change**
Bill,

DB2’s internal time/date counter runs on GMT/Zulu, if I recall correctly. That is not affected by DST rules anywhere. Your local representation of it (display, not storage) should be what changes. You won’t need to restart DB2 for the change to take effect; the offset from GMT should change automatically.

Dan? Terry? Patrick? Affirmation/contradiction?

Philip Sevetson
Computer Systems Manager
5 Manhattan West (33rd St at 10th Ave)
New York, NY 10001-2632
212-857-1688 w
917-991-7052 c
212-857-1659 f
[cid:[login to unmask email]

From: william giannelli [mailto:[login to unmask email]
Sent: Monday, November 06, 2017 8:47 AM
To: [login to unmask email]<mailto:[login to unmask email]>
Subject: [DB2-L] - time change for daylight savings


what effect does falling back one hour have on DB2 for daylight savings?

our z/OS folks wait one hour before starting our systems. do we need to do that? also if they dynamically change the time, should we bring db2 down first?

thanks

Bill

-----End Original Message-----
**This e-mail, including any attachments, may be confidential, privileged, or otherwise legally protected. It is intended only for the addressee. If you received this e-mail in error or from someone who was not authorized to send it to you, do not disseminate, copy, or otherwise use this e-mail or its attachments. Please notify the sender immediately by reply e-mail and delete the e-mail from your system.**
-----End Original Message-----

Philip Sevetson

time change for daylight savings
(in response to Roy Boxwell)
**please note my email address change**
The fact that you’re not including a link or PTF number leaves me suspecting that you’re jerking our chains. But I’m not fully certain, so… “What hump?” (What red alert?)

Philip Sevetson
Computer Systems Manager
5 Manhattan West (33rd St at 10th Ave)
New York, NY 10001-2632
212-857-1688 w
917-991-7052 c
212-857-1659 f
[cid:[login to unmask email]

From: Boxwell, Roy [mailto:[login to unmask email]
Sent: Monday, November 06, 2017 9:31 AM
To: [login to unmask email]
Subject: [DB2-L] - RE: time change for daylight savings

Unless that red alert bit you....

Roy Boxwell

SOFTWARE ENGINEERING GMBH and SEGUS Inc.
-Product Development-

Heinrichstrasse 83-85
40239 Duesseldorf/Germany
Tel. +49 (0)211 96149-675
Fax +49 (0)211 96149-32
Email: [login to unmask email]<mailto:[login to unmask email]>
http://www.seg.de http://www.seg.de

Software Engineering GmbH
Amtsgericht Düsseldorf, HRB 37894
Geschäftsführung: Gerhard Schubert, Bettina Schubert

From: Sevetson, Phil [mailto:[login to unmask email]
Sent: Monday, November 6, 2017 3:07 PM
To: '[login to unmask email]' <[login to unmask email]<mailto:[login to unmask email]>>
Subject: [DB2-L] - RE: time change for daylight savings

**please note my email address change**
Bill,

DB2’s internal time/date counter runs on GMT/Zulu, if I recall correctly. That is not affected by DST rules anywhere. Your local representation of it (display, not storage) should be what changes. You won’t need to restart DB2 for the change to take effect; the offset from GMT should change automatically.

Dan? Terry? Patrick? Affirmation/contradiction?

Philip Sevetson
Computer Systems Manager
5 Manhattan West (33rd St at 10th Ave)
New York, NY 10001-2632
212-857-1688 w
917-991-7052 c
212-857-1659 f
[cid:[login to unmask email]

From: william giannelli [mailto:[login to unmask email]
Sent: Monday, November 06, 2017 8:47 AM
To: [login to unmask email]<mailto:[login to unmask email]>
Subject: [DB2-L] - time change for daylight savings


what effect does falling back one hour have on DB2 for daylight savings?

our z/OS folks wait one hour before starting our systems. do we need to do that? also if they dynamically change the time, should we bring db2 down first?

thanks

Bill

-----End Original Message-----
**This e-mail, including any attachments, may be confidential, privileged, or otherwise legally protected. It is intended only for the addressee. If you received this e-mail in error or from someone who was not authorized to send it to you, do not disseminate, copy, or otherwise use this e-mail or its attachments. Please notify the sender immediately by reply e-mail and delete the e-mail from your system.**
-----End Original Message-----

-----End Original Message-----
**This e-mail, including any attachments, may be confidential, privileged, or otherwise legally protected. It is intended only for the addressee. If you received this e-mail in error or from someone who was not authorized to send it to you, do not disseminate, copy, or otherwise use this e-mail or its attachments. Please notify the sender immediately by reply e-mail and delete the e-mail from your system.**
Attachments

  • image001.png (3.3k)

Daniel Luksetich

time change for daylight savings
(in response to Philip Sevetson)


The biggest impact for us is the SMF data. We translate UTC into local
time zone for reporting. I'm dealing with that right now for a week's
worth of data.

Dan Luksetich

On 11.06.2017 06:07, Sevetson, Phil wrote:

> **please note my email address change**
>
> Bill,
>
> DB2's internal time/date counter runs on GMT/Zulu, if I recall correctly. That is not affected by DST rules anywhere. Your local representation of it (display, not storage) should be what changes. You won't need to restart DB2 for the change to take effect; the offset from GMT should change automatically.
>
> Dan? Terry? Patrick? Affirmation/contradiction?
>
> Philip Sevetson
>
> Computer Systems Manager
>
> 5 Manhattan West (33rd St at 10th Ave)
>
> New York, NY 10001-2632
>
> 212-857-1688 w
>
> 917-991-7052 c
>
> 212-857-1659 f
>
> FROM: william giannelli [mailto:[login to unmask email]
> SENT: Monday, November 06, 2017 8:47 AM
> TO: [login to unmask email]
> SUBJECT: [DB2-L] - time change for daylight savings
>
> what effect does falling back one hour have on DB2 for daylight savings?
>
> our z/OS folks wait one hour before starting our systems. do we need to do that? also if they dynamically change the time, should we bring db2 down first?
>
> thanks
>
> Bill
>
> -----End Original Message----- **This e-mail, including any attachments, may be confidential, privileged, or otherwise legally protected. It is intended only for the addressee. If you received this e-mail in error or from someone who was not authorized to send it to you, do not disseminate, copy, or otherwise use this e-mail or its attachments. Please notify the sender immediately by reply e-mail and delete the e-mail from your system.**
>
> -----End Original Message-----


Links:
------
[1] http://www.idug.org/p/fo/do/?download=1&amp;fid=8895
[2] http://www.idug.org/p/fo/st/?post=183635&amp;anc=p183635#p183635
[3] http://www.idug.org/p/fo/si/?topic=19
[4] http://www.idug.org/p/us/to/
[5] http://www.ESAIGroup.com/idug
[6] http://www.idug.org/p/cm/ld/fid=2

Roy Boxwell

time change for daylight savings
(in response to Philip Sevetson)
z/OS family - all hardware, OS, and related software
Red Alerts: Daylight savings time adjustment may not be reported correctly by LE http://www14.software.ibm.com/webapp/set2/sas/f/redAlerts?myns=z000&mynp=OCHW188&mynp=OCHW18N&mynp=OCHW19Y&mynp=OCHW20L&mynp=OCHW22D&mynp=OCHW23D&mynp=OCHW25D&mynp=OCHW30D&mynp=OCSWG90&mynp=OCSWG80&mynp=OCSWGA0&mynp=OCSWGB0&mync=E&cm_sp=z000-_-OCHW188-OCHW18N-OCHW19Y-OCHW20L-OCHW22D-OCHW23D-OCHW25D-OCHW30D-OCSWG90-OCSWG80-OCSWGA0-OCSWGB0-_-E

Title:

Daylight savings time adjustment may not be reported correctly by Language
Environment (LE) callable services if PTFS UI48771 / UI48801 / UI48802 are
applied.

Users Affected:

All users with PTFs UI48771 / UI48801 / UI48802 installed, and change system
time dynamically (ie without an IPL and regardless of technique).

Problem Description:

A problem was introduced by Language Environment APAR PI78252 which is causing
applications to receive an incorrect current local time value after a dynamic
change to the system time, such as a Daylight Savings Time (DST) change. PTFs
of PI78252 have been marked PE and PI89400 opened.

If you do NOT have the fixes for APAR PI78252 (i.e. PTFs UI48771 / UI48801 /
UI48802) then you are NOT impacted by this alert.

A dynamic time change could be made in several ways, including:

- A DST change made via STP - System Timer Protocol (automatically or manually
via HMC panel)
- SET TIMEZONE
- SET DATE
- SET CLOCK

If the time change is introduced via an IPL, then LE services will return the
correct time. However, if the time change is introduced dynamically,
subsequent calls to LE services may return the incorrect time.


The types of applications that are affected are Language Environment
applications that make use of:

- Language Environment date/time callable services related to the local time:
CEELOCT and CEEGMTO
- High level language semantics that make use of these services, including the
COBOL ACCEPT FROM TIME statement and the CURRENT-TIME function
- PL/I application which use functions like date(), time(), datetime(),
days(), and secs() which invoke the above services under the covers.



Recommended Actions:

Option 1: If the PTFs for PI78252 have not been ACCEPTed, you may back off (i.e.
SMP/E RESTORE) the PTFs. This action requires an IPL in order to take effect.

Option 2: You may install the appropriate APAR fix for PI89400. Note that this
is a temporary fix that backs out the incorrect code that was added by the PTFs
for PI78252. Please refer to details in APAR PI89400 'LOCAL FIX' section to
obtain information about ++APARs that are currently available and how to apply
them.

Option 3: If option 1 or 2 cannot be done prior to the time change, then
introduce the time change via an IPL. If using STP this means ensuring all the
systems with the PE PTFs are down when the clock change takes place and IPLing
afterwards. If not using STP, then the time change can be introduced via the
CLOCKxx member by IPLing at a time determined by the customer.

To read the complete text of this Red Alert as well as previous Red Alerts please use the above link.

Roy Boxwell
SOFTWARE ENGINEERING GmbH and SEGUS Inc.
-Product Development-
Heinrichstrasse 83-85
40239 Düsseldorf/Germany
Tel. +49 (0)211 96149-675
Fax +49 (0)211 96149-32
Email: [login to unmask email]<mailto:[login to unmask email]>
http://www.seg.de

Software Engineering GmbH
Amtsgericht Düsseldorf, HRB 37894
Geschäftsführung: Gerhard Schubert, Bettina Schubert

On 6 Nov 2017, at 15:33, Sevetson, Phil <[login to unmask email]<mailto:[login to unmask email]>> wrote:

**please note my email address change**
The fact that you’re not including a link or PTF number leaves me suspecting that you’re jerking our chains. But I’m not fully certain, so… “What hump?” (What red alert?)

Philip Sevetson
Computer Systems Manager
5 Manhattan West (33rd St at 10th Ave)
New York, NY 10001-2632
212-857-1688 w
917-991-7052 c
212-857-1659 f
[cid:[login to unmask email]

From: Boxwell, Roy [mailto:[login to unmask email]
Sent: Monday, November 06, 2017 9:31 AM
To: [login to unmask email]<mailto:[login to unmask email]>
Subject: [DB2-L] - RE: time change for daylight savings

Unless that red alert bit you....

Roy Boxwell

SOFTWARE ENGINEERING GMBH and SEGUS Inc.
-Product Development-

Heinrichstrasse 83-85
40239 Duesseldorf/Germany
Tel. +49 (0)211 96149-675
Fax +49 (0)211 96149-32
Email: [login to unmask email]<mailto:[login to unmask email]>
http://www.seg.de http://www.seg.de

Software Engineering GmbH
Amtsgericht Düsseldorf, HRB 37894
Geschäftsführung: Gerhard Schubert, Bettina Schubert

From: Sevetson, Phil [mailto:[login to unmask email]
Sent: Monday, November 6, 2017 3:07 PM
To: '[login to unmask email]<mailto:[login to unmask email]>' <[login to unmask email]<mailto:[login to unmask email]>>
Subject: [DB2-L] - RE: time change for daylight savings

**please note my email address change**
Bill,

DB2’s internal time/date counter runs on GMT/Zulu, if I recall correctly. That is not affected by DST rules anywhere. Your local representation of it (display, not storage) should be what changes. You won’t need to restart DB2 for the change to take effect; the offset from GMT should change automatically.

Dan? Terry? Patrick? Affirmation/contradiction?

Philip Sevetson
Computer Systems Manager
5 Manhattan West (33rd St at 10th Ave)
New York, NY 10001-2632
212-857-1688 w
917-991-7052 c
212-857-1659 f
[cid:[login to unmask email]

From: william giannelli [mailto:[login to unmask email]
Sent: Monday, November 06, 2017 8:47 AM
To: [login to unmask email]<mailto:[login to unmask email]>
Subject: [DB2-L] - time change for daylight savings


what effect does falling back one hour have on DB2 for daylight savings?

our z/OS folks wait one hour before starting our systems. do we need to do that? also if they dynamically change the time, should we bring db2 down first?

thanks

Bill

-----End Original Message-----
**This e-mail, including any attachments, may be confidential, privileged, or otherwise legally protected. It is intended only for the addressee. If you received this e-mail in error or from someone who was not authorized to send it to you, do not disseminate, copy, or otherwise use this e-mail or its attachments. Please notify the sender immediately by reply e-mail and delete the e-mail from your system.**
-----End Original Message-----

-----End Original Message-----
**This e-mail, including any attachments, may be confidential, privileged, or otherwise legally protected. It is intended only for the addressee. If you received this e-mail in error or from someone who was not authorized to send it to you, do not disseminate, copy, or otherwise use this e-mail or its attachments. Please notify the sender immediately by reply e-mail and delete the e-mail from your system.**
-----End Original Message-----

Peter Hunkeler

AW: time change for daylight savings
(in response to william giannelli)


>what effect does falling back one hour have on DB2 for daylight savings?


None to DB2. However, applications might acquire timestamps outside of DB2, and these timestamps might be in local time not UTC. Depending on what applications do with such timestamps, the duplicates may or may not hurt.


I think the reason many shops stop their systems for one hour is because nobody is willing to guarantee they do *not* have software which would be failing for duplicate timestamps.


--
Peter Hunkeler

James Campbell

time change for daylight savings
(in response to Philip Sevetson)
Since no-one has responded:

1) off the top of my head

(DAYS(ts1) -DAYS(ts2))*24 +
INTEGER(
( MIDNIGHT_SECONDS(ts1) - MIDNIGHT_SECONDS(ts2) +
( ( MICROSECOND(ts1) - MICROSECOND(ts2) ) / 1000000 )
) / 3600)

2) I believe that DB2 uses its own Store Clock instructions to get the TOD clock value. The
TOD clock might be running off UTC, or local time, or anything that someone at one time
configured it as. Part of the configuration for an LPAR is the difference between an external
time source (eg http://tf.nist.gov/tf-cgi/servers.cgi ) and the TOD clock value. The
differences between TOD time and local time are stored in the CVT. (Two differences
because the SYS1.PARMLIB(CLOCKxx) and leap second differences are separate.)

DB2 uses a raw TOD Clock value for for LRSN, UOW and DBRM CONTOKEN purposes.
Which is why it is a "VERY BAD THING" to reset the TOD clock to a value that is lower than
a previously used value.

For SQL date/time purposes DB2 uses separate Store Clock instructions and does its own
conversion (using the CVT values) to local date/time . Hence DB2's adjustment for DST is
as automatic as the new CLOCKxx value. (Tools like HourGlass replace these Store Clock
instructions to return an adjusted value to DB2).

Note: UTC, not GMT.

James Campbell

On 6 Nov 2017 at 14:30, Sevetson, Phil wrote:

>
> **please note my email address change**
> I´m trying to produce a demonstrative test, but I´m floundering trying to compute the
> number of hours between two created timestamp fields. Does anyone have a working
> example of computing the difference between two timestamps, and showing the result in
> some meaningful format (such as, number of years/months/days/hours/whatever)?
>  
> Philip Sevetson
> Computer Systems Manager
> 5 Manhattan West (33rd St at 10th Ave)
> New York, NY 10001-2632
> 212-857-1688 w
> 917-991-7052 c
> 212-857-1659 f
> cid:[login to unmask email]
>  
> From: Sevetson, Phil [mailto:[login to unmask email]
> Sent: Monday, November 06, 2017 9:07 AM
> To: '[login to unmask email]'
> Subject: [DB2-L] - RE: time change for daylight savings
>  
> **please note my email address change**
> Bill,
>  
> DB2´s internal time/date counter runs on GMT/Zulu, if I recall correctly. That is not
> affected by DST rules anywhere.  Your local representation of it (display, not storage)
> should be what changes.   You won´t need to restart DB2 for the change to take effect; the
> offset from GMT should change automatically.
>  
> Dan? Terry? Patrick? Affirmation/contradiction?
>  
> Philip Sevetson

Wolfgang Manus

RE: time change for daylight savings
(in response to Philip Sevetson)

Re your timestamp difference calculation question, try the timestampdiff function:

https://www.ibm.com/support/knowledgecenter/en/SSEPEK_11.0.0/sqlref/src/tpc/db2z_bif_timestampdiff.html

HTH - Wolfgang


James Campbell

time change for daylight savings
(in response to Wolfgang Manus)
The explanation includes the word "estimated" and a list of the assumptions that it uses.
Hence it might not be accurate if, for example, the period between the timestamps includes
an entire month that does not have 30 days - which is eight of the twelve.

James Campbell

On 8 Nov 2017 at 9:27, Wolfgang Manus wrote:

>
> Re your timestamp difference calculation question, try the timestampdiff function:
> https://www.ibm.com/support/knowledgecenter/en/SSEPEK_11.0.0/sqlref/src/tpc/db2z_bif_timest
> ampdiff.html
> HTH - Wolfgang
>