Operating System - HP-UX
1824824 Members
3895 Online
109674 Solutions
New Discussion юеВ

How to set Date beyond 31st Dec 2037

 
maint141
Occasional Advisor

How to set Date beyond 31st Dec 2037

Hi All,
Can somebody let me know how to set date beyond 31st December 2037. My system is as below,
OS: HP-UX 11.23
Itanium servers.

Regards
Varian
11 REPLIES 11
Muthukumar_5
Honored Contributor

Re: How to set Date beyond 31st Dec 2037

You can do as,

date [mmddhhmm[[cc]yy]]
date 1231000037

It will work.
Easy to suggest when don't know about the problem!
maint141
Occasional Advisor

Re: How to set Date beyond 31st Dec 2037

Hi Muthukumar,

I want to set date beyond 31st Dec 2037 i,e I want to set date of the year 2038. Please suggest.

Thanks & Regards
Varian
Muthukumar_5
Honored Contributor

Re: How to set Date beyond 31st Dec 2037

Yes. There is a problem in time_s or time_x structure in all unix systems. I heard that it is a problem of y2037 problem or something. ?!

Anyway try to do as,

date 0101000038

Is it working?
Easy to suggest when don't know about the problem!
Muthukumar_5
Honored Contributor

Re: How to set Date beyond 31st Dec 2037

Read this:
http://docs.hp.com/en/948/libcy2k.html

http://www.uic.edu/depts/accc/software/isodates/datefix.html

hth.
Easy to suggest when don't know about the problem!
Jeff Schussele
Honored Contributor

Re: How to set Date beyond 31st Dec 2037

Hi Varian,

Actually this is a known UNIX bug & it has to do with how the date is tracked. It uses seconds past midnight Jan 1 1970.
It can only hold 2 to the 31 power which is Jan 19 2038.
This can usually be solved by using a 64-bit system, but you already are running one so I suspect you probably need a patch or firmware update.
I searched the patch database & could find no explicit patch for this so you should probably log a SW call with the Response Center.
See this URL for a little perl script to see if the system is 2038 compliant.

http://www.gsp.com/2038/

HTH,
Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
harry d brown jr
Honored Contributor

Re: How to set Date beyond 31st Dec 2037

You don't and can't set the date past Dec 31st, 2037 at this time!

11.23 is 64bit, but some commands are not yet.

getdate will work, providing you use the correct options.


man getdate
man ctime

live free or die
harry d brown jr
Live Free or Die
maint141
Occasional Advisor

Re: How to set Date beyond 31st Dec 2037

Hi Muthukumar,


Even with comman "date 0101000038" it is giving me error "exceeds maximum date"
Do I need to aply any patch for this ?

Regards
Varian

Muthukumar_5
Honored Contributor

Re: How to set Date beyond 31st Dec 2037

Read Jeff's reply. It will help you out.
Easy to suggest when don't know about the problem!
Amit Agarwal_1
Trusted Contributor

Re: How to set Date beyond 31st Dec 2037

You cannot use date command, it is 32-bit build. Instead you might have to write your own program using *date* APIs. You have to go through the manpages to see what will work and what will not.

To start with do 'man date' and look for other date related routines in "SEE ALSO" section.
harry d brown jr
Honored Contributor

Re: How to set Date beyond 31st Dec 2037

Actually there is NO patch, as this isn't deemed an issue as of yet:

man date

on an Itanium (11.23 with the absolute most latest patches):


Currently, the maximum date supported is December 31, 2037 23:59:00 UTC.


live free or die
harry d brown jr
Live Free or Die
Suraj Singh_1
Trusted Contributor

Re: How to set Date beyond 31st Dec 2037

Currently, the maximum time supported is upto Tue Jan 19 03:14:07 2038 GMT.

Regards
What we cannot speak about we must pass over in silence.