- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Date and Time
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Forums
Discussions
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
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- 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
04-15-2003 10:13 PM
04-15-2003 10:13 PM
Date and Time
i have questions about the date and time and HP-UX...
How can i check and change the real system date and time ?
CATIA does not use the time given by "date"...
Which is the function of the "date"-time ?
Thx
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-15-2003 10:21 PM
04-15-2003 10:21 PM
Re: Date and Time
Hello,
Without really knowing what your problem is
I have these comments/questions.
. Using the command date in a shell does
it return correct data. If not check
the value of the environment-variable TZ
. I would guess CATIA uses some c-function
to get info about date/time. All of these
functions depend on what TZ is set to. So
check if TZ is set correctly (and exported)
when you start CATIA
Olav
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-15-2003 10:26 PM
04-15-2003 10:26 PM
Re: Date and Time
my problem is :
- the command date gives : 9.25 am
- when i write a CATIA-model, the time of the file is 8.25 am
Why this difference ??
I have set MET-1METDST.
thx
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-15-2003 10:27 PM
04-15-2003 10:27 PM
Re: Date and Time
If you intend changing the time backwards, beware that databases do not like it all, and you could crsah these. To change the timezone, use the 'set_parms' command.
# set_parms -timezone
Have a look at the man page for this also, it does mention that you need to reboot your system.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-15-2003 10:40 PM
04-15-2003 10:40 PM
Re: Date and Time
If your particular application does not use the time given by the date command, what else could it be using?
Can you point out the places where it differs - some log entry is dated different from the actual system time?
Maybe if you see the manuals for your application, there is some mention of this - maybe that the date is written following GMT, etc rather than the actual TZ.
system date is obtained as a long in C language, using the ftime command.
to set a new time on your system, as root run date -u [+format].
of course, if ntp is running on your system and there's a time server available on your network, the time would typically get adjusted to synch with the time server.
HTH.
- ramd.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-15-2003 10:42 PM
04-15-2003 10:42 PM
Re: Date and Time
#set_parms timezone should synchronize all times
You have the RTC,file system time and system time.
This document should help you
http://www1.itrc.hp.com/service/cki/docDisplay.do?docLocale=en_US&docId=200000063203197
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-15-2003 10:49 PM
04-15-2003 10:49 PM
Re: Date and Time
I think CATIA uses some C time subroutine, It depends on which subroutine used if adjusted for daylight saving time or not (check the man 3 page for ctime). Which subroutine CATIA uses can perhaps only someone from CATIA give an answere to.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-15-2003 10:50 PM
04-15-2003 10:50 PM
Re: Date and Time
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-15-2003 11:53 PM
04-15-2003 11:53 PM
Re: Date and Time
Hello,
A very usual way for a c-program to obtain
date/time info is to do the following:
time_t secs;
struct tm *tid;
secs = time(0);
tid = localtime(&secs);
The call to time returns the number of seconds
passed since the Epoch.
The call to localtime converts this info to
a more usable format, using information
from /usr/lib/tztab about your timezone, daylight-saving time.
What entry in tztab that is used depends on
the value of the environment-variable TZ.
It may be that CATIA only uses a call to time() and has some other method of converting this info to your local-time, but I doubt it.
If you still get the time wrong after beeing
100% sure that CATIA is started in such a way
that it picks up the correct TZ, it is time
to contact the vendor of CATIA to see if some
other config-value is missing.
Olav
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-16-2003 03:42 AM
04-16-2003 03:42 AM
Re: Date and Time
edit the /etc/ntp.conf file with valid NTP server names.
you may add a drift file
/etc/ntp.drift
a good value = 3.849 0
then in /etc/rc.config.d/netdaemons file
there is 3 lines to edit
export NTPDATE_SERVER="sometimeserver.internet.com"
export XNTPD=1
export XNTPD_ARGS=" -c /etc/ntp.conf"
almost there.
then run /sbin/init.d/xntpd start
ntp should be running, then you never have to worry about your system clock again.
#ntpq -p
checks the network time.
peace
Donny