HPE GreenLake Administration
- Community Home
 - >
 - Servers and Operating Systems
 - >
 - Operating Systems
 - >
 - Operating System - HP-UX
 - >
 - Re: Next time change?
 
Operating System - HP-UX
        1840181
        Members
    
    
        3159
        Online
    
    
        110162
        Solutions
    
Forums
        Categories
Company
Local Language
                
                  
                  back
                
        
                
        
                
        
                
        
        
        
                
        
                
        
        
        
                
        
              
              Forums
Discussions
Forums
- Data Protection and Retention
 - Entry Storage Systems
 - Legacy
 - Midrange and Enterprise Storage
 - Storage Networking
 - HPE Nimble Storage
 
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
                
                  
                  back
                
            
                
            
                
            
                
            
                
            
                
            
                
            
                
            
                
            
                
            
                
            
                
            
                
            
                
            
                
            
                
            
                
            
            
                
            
                
            
                
            
                
            
            
                
            
                
            
            
                
            
                
              
            Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
 - Appliance Servers
 - Alpha Servers
 - BackOffice Products
 - Internet Products
 - HPE 9000 and HPE e3000 Servers
 - Networking
 - Netservers
 - Secure OS Software for Linux
 - Server Management (Insight Manager 7)
 - Windows Server 2003
 - Operating System - Tru64 Unix
 - ProLiant Deployment and Provisioning
 - Linux-Based Community / Regional
 - Microsoft System Center Integration
 
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Blogs
        Information
        Community
Resources
Community Language
        Language
        Forums
Blogs
	
		
			
            
                
            Go to solution
        
            
		
		
			
            	
	
		
        
		
	
	
		Topic Options
			
				
					
	
			
		
	- Subscribe to RSS Feed
 - Mark Topic as New
 - Mark Topic as Read
 - Float this Topic for Current User
 - Bookmark
 - Subscribe
 - Printer Friendly Page
 
- Mark as New
 - Bookmark
 - Subscribe
 - Mute
 - Subscribe to RSS Feed
 - Permalink
 - Report Inappropriate Content
 
02-16-2004 08:53 AM
02-16-2004 08:53 AM
			
				
					
					
						Hi,
I would like to create some kind of automatic notification of the next daylight saving time change. Is there a command to display the number of days until the next time change or the date of the next time change?
Thanks in advance for any and all help,
Jim
					
				
			
			
				
			
			
				
	
			
				
		
			
			
			
			
			
			
		
		
		
	
	
	
I would like to create some kind of automatic notification of the next daylight saving time change. Is there a command to display the number of days until the next time change or the date of the next time change?
Thanks in advance for any and all help,
Jim
Solved! Go to Solution.
		3 REPLIES 3
	
	            
            
		
		
			
            
                - Mark as New
 - Bookmark
 - Subscribe
 - Mute
 - Subscribe to RSS Feed
 - Permalink
 - Report Inappropriate Content
 
02-16-2004 09:00 AM
02-16-2004 09:00 AM
Solution
			
				
					
					
						First of all, you should know that there is no need to do anything on a UNIX box. All UNIX boxes in the known universe simply count seconds since 00:00:00 01/01/1970 UTC. TZ (Timezone) only affects how the time is DISPLAYED and moreover, there is no one TZ; each user on the box could have his own custom TZ. You could parse /usr/lib/tztab on HP-UX boxes and try to figure this out but the good news is that I have a Perl script that will do this (and it even works on Windows if one of the freely available Perl's is installed).
Use it like this:
DAYS=$(dst.pl -d -e)
echo "${DAYS} until time change"
(drop the -e and floating-point days will be returned; with -e integer days will be returned; invoke as dst.pl -u for full usage)
					
				
			
			
				
		
		
	
	
	
Use it like this:
DAYS=$(dst.pl -d -e)
echo "${DAYS} until time change"
(drop the -e and floating-point days will be returned; with -e integer days will be returned; invoke as dst.pl -u for full usage)
	If it ain't broke, I can fix that.
			
			
				
			
			
			
			
			
			
		- Mark as New
 - Bookmark
 - Subscribe
 - Mute
 - Subscribe to RSS Feed
 - Permalink
 - Report Inappropriate Content
 
02-16-2004 09:02 AM
02-16-2004 09:02 AM
			
				
					
						
							Re: Next time change?
						
					
					
				
			
		
	
			
	
	
	
	
	
			
				
					
					
						I should add that this is only as good as the current setting of TZ. Different TZ's will get different values. If you cron this, make sure that your set and export TZ to the desired value and set PATH as well.
					
				
			
			
				
		
		
	
	
	
	If it ain't broke, I can fix that.
			
			
				
			
			
			
			
			
			
		- Mark as New
 - Bookmark
 - Subscribe
 - Mute
 - Subscribe to RSS Feed
 - Permalink
 - Report Inappropriate Content
 
02-17-2004 02:53 AM
02-17-2004 02:53 AM
			
				
					
						
							Re: Next time change?
						
					
					
				
			
		
	
			
	
	
	
	
	
			
				
					
					
						Thank you Clay. This morning I received a mail message saying that there were 46 days until the next time change. Your script worked perfectly.
Thanks,
Jim
					
				
			
			
				
			
			
				
			
			
			
			
			
			
		
		
		
	
	
	
Thanks,
Jim
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
		
	
	
Company
Events and news
Customer resources
© Copyright 2025 Hewlett Packard Enterprise Development LP