- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- 32 bit getdate
Operating System - HP-UX
1753899
Members
7951
Online
108809
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
Discussions
Discussions
Forums
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
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
тАО06-24-2004 06:57 AM
тАО06-24-2004 06:57 AM
32 bit getdate
I have a problem with my 32 bit application and using getdate(3C) for years beyond CC38.
So if the date specifies no century, it assumes 2000 and fails because the year is beyond the limits of 32 bit time_t (>2038).
I would like to continue using my 32 bit programs for the time being, but the 32 bit time_t and specifically getdate are making it hard.
I use the aCC compiler and the -ext option to allow the "long long" 64 bit integers and I keep thinking if I had the source for strptime I could change the time_t's to long long and it would handle the future dates ok.
Is that logical? is there anywhere I could get source close to compiling on hp-ux for getdate and strptime ? Is there an efficient way I could use a 64bit getdate/strptime with my 32bit app (other than a seperate program) ?
So if the date specifies no century, it assumes 2000 and fails because the year is beyond the limits of 32 bit time_t (>2038).
I would like to continue using my 32 bit programs for the time being, but the 32 bit time_t and specifically getdate are making it hard.
I use the aCC compiler and the -ext option to allow the "long long" 64 bit integers and I keep thinking if I had the source for strptime I could change the time_t's to long long and it would handle the future dates ok.
Is that logical? is there anywhere I could get source close to compiling on hp-ux for getdate and strptime ? Is there an efficient way I could use a 64bit getdate/strptime with my 32bit app (other than a seperate program) ?
- Tags:
- getdate
2 REPLIES 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-24-2004 09:00 AM
тАО06-24-2004 09:00 AM
Re: 32 bit getdate
There is simply no way that you are going to be able to mox 64-bit and 32-bit code in the same executable. It probably makes more sense to simply compile with +DD64 and be done with it. Eventhough the getdate function should be able to safe process years beyond 2038 the concern is that the reverse functions which ultimately have to convert to a time_t will not fit in a 32-bit integer.
Probably your least evil method is to fork() and exec() a child 64 bit process that simply does the date conversions and communicates via pipes, if you are determined to stay in 32-bit land.
You should be able to download and compile your own pet versions of the date functions from www.freebsd.org. The source code is readily available there but you still have the problem of trying to represent epoch seconds in 32 bits of data.
Probably your least evil method is to fork() and exec() a child 64 bit process that simply does the date conversions and communicates via pipes, if you are determined to stay in 32-bit land.
You should be able to download and compile your own pet versions of the date functions from www.freebsd.org. The source code is readily available there but you still have the problem of trying to represent epoch seconds in 32 bits of data.
If it ain't broke, I can fix that.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-25-2004 07:23 AM
тАО06-25-2004 07:23 AM
Re: 32 bit getdate
that helped, I was able to get the source for just getdate and it turns out, it all works without using any 64 bit longs, its just got a check before it returns to make sure it fits into a time_t, so I just took that out and it works like the 64bit version. thanks.
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.
News and Events
Support
© Copyright 2024 Hewlett Packard Enterprise Development LP