The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
google unix.com



UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
SCO Backups and Verify Log jfd7000 SCO 1 04-28-2008 10:49 AM
verify if a process exists (ps) melanie_pfefer Shell Programming and Scripting 4 04-05-2008 04:34 PM
verify arguments bebop1111116 Shell Programming and Scripting 2 09-19-2006 08:08 PM
Verify Parameters lesstjm Shell Programming and Scripting 2 04-17-2003 04:59 PM
Solaris (verify 64 or 32 bit witt UNIX for Dummies Questions & Answers 3 11-30-2001 12:46 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 03-01-2007
Yorgy Yorgy is offline
Registered User
  
 

Join Date: Sep 2006
Posts: 15
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 (permalink)  
Old 03-01-2007
jim mcnamara jim mcnamara is offline Forum Staff  
...@...
  
 

Join Date: Feb 2004
Location: NM
Posts: 5,717
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 (permalink)  
Old 03-01-2007
Yorgy Yorgy is offline
Registered User
  
 

Join Date: Sep 2006
Posts: 15
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 (permalink)  
Old 03-01-2007
BOFH BOFH is offline Forum Advisor  
Registered User
  
 

Join Date: Feb 2005
Location: Broomfield, CO
Posts: 406
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 (permalink)  
Old 03-01-2007
Yorgy Yorgy is offline
Registered User
  
 

Join Date: Sep 2006
Posts: 15
I appreciate the help, it worked as specified!
Thanks!
  #6 (permalink)  
Old 03-01-2007
MizzGail's Avatar
MizzGail MizzGail is offline
Registered User
  
 

Join Date: Sep 2001
Location: Syracuse, NY
Posts: 164
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
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 02:51 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0