GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Problem with C++ programming in rp7410
Operating System - HP-UX
1847837
Members
4648
Online
104021
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
Forums
Discussions
back
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
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
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
03-28-2004 12:57 PM
03-28-2004 12:57 PM
Problem with C++ programming in rp7410
Hi,
I have a problem with C++ programming,my host is rp7410, when I used time(now) function to get system time,i found that the time is 13 hours slower than current time.but i use date command, the output is right.Why?
I have a problem with C++ programming,my host is rp7410, when I used time(now) function to get system time,i found that the time is 13 hours slower than current time.but i use date command, the output is right.Why?
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-28-2004 01:12 PM
03-28-2004 01:12 PM
Re: Problem with C++ programming in rp7410
What is the TZ on your system?
echo $TZ
Could you paste in the code you are using and the two outputs?
SEP
echo $TZ
Could you paste in the code you are using and the two outputs?
SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-28-2004 07:29 PM
03-28-2004 07:29 PM
Re: Problem with C++ programming in rp7410
$ echo $TZ
$ ETA-8
My application is running as following:#su - aps -c "./application &". Recently i check the application log, and find the log time is 11 hours less.
$ ETA-8
My application is running as following:#su - aps -c "./application &". Recently i check the application log, and find the log time is 11 hours less.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-29-2004 03:22 AM
03-29-2004 03:22 AM
Re: Problem with C++ programming in rp7410
First of all, the time() system call does not return a human time in any sense. It simply returns (or loads a value pointed to) with epoch seconds -- the number of seconds since Jan 1, 1970 00:00:00 UTC. You can only get this epoch time converted into something more meaningful by using a time-formatting function like localtime(),gmtime(), or stdftime(). If these functions are returning strange values then I suggest that you do a getenv("TZ") call within your program and display that value. All of these epoch seconds to formatted time functions take TZ into account.
If it ain't broke, I can fix that.
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 2026 Hewlett Packard Enterprise Development LP