How to verify DST Update


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers How to verify DST Update
# 1  
Old 03-01-2007
How to verify DST Update

Hello,

Does anyone know how can I verify if the DST update on a SCO Unixware system has been installed successfully? UNIXWARE 7.1.4 MP3

Looking forward to some help, please....

Thanks
# 2  
Old 03-01-2007
print the curretime, add 20 days to it and see what you get:
Code:
#include <time.h>
void mytime(time_t *val)
{
	struct tm *p=localtime(val);
	char tmp[80]={0x0};
	strftime(tmp, 80, "%d-%b-%Y:%H:%M:%S %Z", p);
	printf("%s\n", tmp);
}

int main()
{
	time_t lt=time(NULL);

	mytime(&lt);
	lt+=20*86400;
	mytime(&lt);
	return 0;
}

I get
Code:
kcsdev:/home/jmcnama> cc dst.c
kcsdev:/home/jmcnama> ./a.out
01-Mar-2007:10:31:25 MST
21-Mar-2007:11:31:25 MDT
kcsdev:/home/jmcnama>

# 3  
Old 03-01-2007
Thank you for your quick reply.

Could you please tell me what Shell are you using for this code?
BASH does not seem to like it... :-(
# 4  
Old 03-01-2007
It's a c program. You have to compile it. He created it as dst.c (look in the second example), compiled it with cc and then ran a.out, the resulting compiled binary.

Carl
# 5  
Old 03-01-2007
I appreciate the help, it worked as specified!
Thanks!
# 6  
Old 03-01-2007
My c compiler is not working. I have a request into my admin.
I found a date calc by searching the forums, but nothing with time.
Is there a way to do this easily in ksh?

thanks
# 7  
Old 03-01-2007
MizzGail: got perl?

It has localtime and strftime - to see how to use them try
Code:
perldoc -f localtime
and perldoc -f strftime

 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Handle Autosys with DST Changes

Hi, I have one confusion regarding DST chnages which are going to happen after October. :confused: :confused: I have few jobs on Autosys which run as per Japan Time. they shoudl not be affected by switiching off of DST time. Our autosys instance server is based on UK which is running on... (0 Replies)
Discussion started by: girdharsourabh
0 Replies

2. Linux

my server is 1 hour behind after DST

Hello, I have linux server which is one hour behind after the DST change last week. I post some information below on the settings. any helpwould be helpful since I am newbie.. $ clock Tue 04 Nov 2008 03:12:26 PM EST -0.785549 seconds $more clock Tue 04 Nov 2008 03:12:26 PM EST... (2 Replies)
Discussion started by: jbdavis02@yahoo
2 Replies

3. High Performance Computing

verify patch update

Hi All, If I need to verify my solaris 8 with patch 110910-03 and I query the server below: #showrev -p | grep 'Patch: 110910-' Patch: 110910-01 Obsoletes: Requires: Incompatibles: Packages: SUNWcsu Do I still need to apply the patch if the older 110910-01 patch exist? Please... (5 Replies)
Discussion started by: itik
5 Replies

4. AIX

Australia NSW DST

Hello. Our application is running on AIX box located in NSW , Australia. As DST starts on Oct 28th - Do you know IF AIX boxes have auto updates of day light saving times? IF not , how to do it? IF yes, where can I verify it? Thank you! (3 Replies)
Discussion started by: panchpan
3 Replies

5. Shell Programming and Scripting

DST Change For Australia

Hello , We are investigating an issue from a customer from Western Australia related to DST change on 25 th March. The customer in Australia has the below settings for Time Zone. The System is Solaris 9. TZ=Australia/NSW CMASK=022 We are trying to reproduce the problem in our local... (1 Reply)
Discussion started by: Mohammed
1 Replies

6. Solaris

DST Patch

How to update DST patch. Whatat are the necessary steps that have to be taken on the servers to update this patch?. (1 Reply)
Discussion started by: sandeepkv
1 Replies

7. AIX

AIX and DST

Just a quick last minute thing here. AIX 5.1. I ran the perl script referenced in the tutorials and found the AIX box is triggering DST on the 14th instead of the 11th. The 5.2 boxes come back with the right answers. The DST patches have been applied (or I'd have Apr 1st instead of the 14th). ... (0 Replies)
Discussion started by: BOFH
0 Replies

8. SCO

Dst - V 3.6.3

Hello, Anyone know where I can find the DST updates for SCO Xdesktop 3.6.3? Thanks (0 Replies)
Discussion started by: ddzc
0 Replies

9. SCO

DST script for 5.0.0

I checked SCO's site for DST fix for SCO 5.0.0 and there iis not one available. Can I run a script in the cron to read in and change the time? TiA (2 Replies)
Discussion started by: tbgeek
2 Replies

10. Solaris

DST on Solaris 2.6/7

I have several servers that are outside the country and are running Solaris 6 mainly with a few Solaris 7 boxes here and there. Because of that, we need to schedule time to change the time on March 11th and again in April, October and November. At least until the customer decides it's time to... (3 Replies)
Discussion started by: BOFH
3 Replies
Login or Register to Ask a Question