Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VM Pro Module to Check DST (Daylight Savings Time) - $ISDST

Status
Not open for further replies.

DBrewsky

Vendor
Jan 23, 2006
1,381
US
Hey everyone! It's early November in the US and only two things are happening. You're probably voting, and probably trying to change clocks on a lot of systems.

I have a client in Arizona who has an IP500 with Linux VM Pro on rls 9.1.8. Unfortunately in Arizona we don't use daylight savings. This means during the summer we are on Pacific Time, and in the Winter we are on Mountain time.

I attempted to use the $ISDST option in VM Pro, but found this only checks to see if the system is on DST or not. Since the system is setup using the Arizona timezone, this value never changes.

Has anyone been able to create a module based upon the DST formula?

DST begins at 2:00 a.m. on the second Sunday of March
DST ends at 2:00 a.m. on the first Sunday of November

Thanks!!

--DB

 
Why not use an external SNTP server that is running on the correct time?

 
We do use an external server. It's just that Arizona is never in DST.

--DB

 
indeed so you should have the correct time zone set on both the VM Pro server & the IPO
Also make sure the Automatic DST dick box is un-ticked & you should be good to go

(not I am in the UK so this is purely theoretical & not tested)


Do things on the cheap & it will cost you dear
 
There must be more to this as to why you care about DST. Arizona is arizona time, we are never pacific, nor are we mountain, we are Arizona. Our time's may coincide with others, but we are never them, nor shall we be. VIVA LA ZONA.
In any case, if you are trying to do some testing in vmpro for some reason to see if the time has changed, then just do a calendar entry. Check to see if it is this day, and if so, it's 1 hour more or less than the actual time.

-Austin
I used to be an ACE. Now I'm just an Arse.
qrcode.png
 
True, Arizona is Arizona. The country revolves around us in the DST world.

Bad thing about selecting a calendar date is the day changes each year.

I am working on a formula that checks system variables ($YEAR, $MONTH, $DAY ) and will post results.

--DB

 
Can't you change the timezone to whichever time you wanna be on?

"Trying is the first step to failure..." - Homer
 
Hi.. I can, but here is the issue.

The customer has a call center that changes their hours to accommodate the rest of the US. So during the winter hours, the call center is on Mountain Time, and during the summer, the call center is on Pacific time. The rest of the office doesn't change based upon the time of year.

What I need to do is have the VM Pro answer the call and then determine a few things:
1 - Is it a holiday? If yes, play holiday greeting.
2 - Is it a partial day? (example: day before Christmas and they're closing early) If it is an early close - play closed greeting.
3 - Is it Daylight Savings? (determine winter or summer) If winter or summer, then check the weekly schedule to see if the call center is open ***(this is broken)
4 - if not open, then closed greeting is played.
5 - if open, send caller to Auto Attendant, or in to the Hunt Group to put the caller in queue.

Other than the Daylight Savings test, it works great and the call flow works beautifully.

I primarily used modules and module return with true/false or yes/no from other modules to determine the above questions status. Neat thing about it is I can call modules from other modules without having to duplicate all the decision making work in every module.


--DB

 
Why not just pre-program a list of days to check if day light savings is on or off? I would be the same as checking a holiday.

Is it Sunday, March 12, 2AM (or relevant time zone the system is actually in)? Oh snap, it is, okay well I guess we open an hour earlier at 7AM rather than 8AM, or whatever.
Is it Sunday November 5th, at such and such time, on snap, it is, I guess we're an hour later or whatever.

This would be easy enough to setup and test with within your own module and just fake the dates (the real ones are below).

Code:
Year	DST Start (Clock Forward)	DST End (Clock Backward)
2017	Sunday, March 12, 2:00 am	Sunday, November 5, 2:00 am
2018	Sunday, March 11, 2:00 am	Sunday, November 4, 2:00 am
2019	Sunday, March 10, 2:00 am	Sunday, November 3, 2:00 am

-Austin
I used to be an ACE. Now I'm just an Arse.
qrcode.png
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top