Online Expert Day - HPE Data Storage - Live Now
April 24/25 - Online Expert Day - HPE Data Storage - Live Now
Read more
Operating System - OpenVMS
cancel
Showing results for 
Search instead for 
Did you mean: 

Difference in interactive utc$time_setup & cmd line use...

SOLVED
Go to solution
Rich Hearn
Regular Advisor

Difference in interactive utc$time_setup & cmd line use...


Hi all,

what's the difference between running utc$time_setup interactivly and using a cmd string such as (@sys$manager:utc$time_setup.com "" tdf -240 +60) to go to DST? My App (Cache` - from Intersystems) doesn't pick up the time change (they say they use the POSIX time), but checking everything I can think of appears to be correct - what could I be missing? VMS time looks ok, just the App isn't. What is POSIX time - in regards to VMS, time of day, etc? Are they separate areas of timekeeping or all from the same source in the kernel/hardware?

Tnx
Rich
9 REPLIES
Arch_Muthiah
Honored Contributor

Re: Difference in interactive utc$time_setup & cmd line use...

Rich,

If you use older version of VMS, then Posix RTL's time related functions are different from DEC C RTLs time functions. So what hardware and OS are you using?

Archunan
Regards
Archie
Rich Hearn
Regular Advisor

Re: Difference in interactive utc$time_setup & cmd line use...

Archunan,

Apologies for not having included my versions - Hardware is ES47's; a 2 node cluster running VMS 7.3-2 (patch v400) with Multinet v5.1

Rich
Volker Halle
Honored Contributor

Re: Difference in interactive utc$time_setup & cmd line use...

Rich,

welcome to the OpenVMS ITRC forum.

Did you also check the SYS$*TIME* logicals (timezone info etc.) ?

Volker.
Rich Hearn
Regular Advisor

Re: Difference in interactive utc$time_setup & cmd line use...

Volker,

Thanks for the interest & question - attached is a .txt of what happens when I make the change. Perhaps my expectations are not correct; I'm thinking I should be able to change the time and the system will "act" as if it's truely the "time change" time without a re-boot (I don't intend to re-boot VMS on the actual occurance of the time change).

Rich
Volker Halle
Honored Contributor

Re: Difference in interactive utc$time_setup & cmd line use...

Rich,

the timezone did not change (should be EDT ), neither did the DAYLIGHT_SAVING logical (should be 1 for indicating, that you are in daylight savings mode).

But your system time is NOT YET in the DST time interval, so everything is as expected. Your system date is 30-MAR-2006, EDT is not starting before 02-APR-2006 02:00 !

I would strongly suggest to let OpenVMS handle this automatically by setting AUTO_DLIGHT_SAV=1 (this is not a dynmaic parameter, so you would have to reboot prio to 2-APR-2006) or using SYS$EXAMPLES:DAYLIGHT_SAVINGS.COM (please read the comments at the beginning of that file for usage instructions).

Volker.
Sebastian Bazley
Regular Advisor

Re: Difference in interactive utc$time_setup & cmd line use...

N.B. The C RTL uses the logical "TZ" if it is defined:

$ defi tz gmt0
$ perl -e "print scalar localtime, scalar gmtime"
Thu Mar 30 16:05:46 2006Thu Mar 30 16:05:46 2006
$ deass tz
$ perl -e "print scalar localtime, scalar gmtime"
Thu Mar 30 17:05:58 2006Thu Mar 30 16:05:58 2006

This is on VMS 7.3-2.
Rich Hearn
Regular Advisor

Re: Difference in interactive utc$time_setup & cmd line use...

Volker,

If I'm understanding you correctly, you're saying that because I'm not changing the date to be what the VMS Kernel computes to be the correct event time, the system is *not* really changing the system time - only the piece that show current time. Yes? IOW, to emmulate the actual occurance, I'd need to change the system date to be Apr 2 2006 at 01:59

Sebastian,

Apologies, I don't understand what it is your code lines are explaining - my lack of Perl knowledge. Would you clarify?

Tnx to both of you,

Rich

Volker Halle
Honored Contributor
Solution

Re: Difference in interactive utc$time_setup & cmd line use...

Rich,

your application seems to be using the CRTL time functions, which honour the timezone information. As you did not change your timezone to EDT yet, the application still uses the EST timezone. It will be o.k. after 2-APR-2006 02:00. But note that you will have to change the OpenVMS time at 2-APR-2006 02:00 to correctly display the system time during daylight savings time (EDT).

The perl example just shows, that the time printed by the application is being influenced by the timezone (tz logical).

Volker.
Rich Hearn
Regular Advisor

Re: Difference in interactive utc$time_setup & cmd line use...

Volker,

Thank you for the explanation. I follow what you are saying about this. I also changed the systems' date/time (after my previous response to you) to be 2-Apr-2006:01:59:00 (wait a minute) at which point I *was* able to test and see the results I was expecting to see. The main point being, for me, to check my .com to make sure it works correctly.

Thank you to each responder,

Rich