- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Obscure "HiRes.so" problem when buidling Perl ...
Operating System - HP-UX
1753972
Members
8273
Online
108811
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
тАО02-11-2009 05:38 PM
тАО02-11-2009 05:38 PM
Re: Obscure "HiRes.so" problem when buidling Perl 5.8.8
Ooops, I forgot to mention one more thing.
I met the HiRes issue when building Perl 5.10.0 on 11.31.
Shinji
I met the HiRes issue when building Perl 5.10.0 on 11.31.
Shinji
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-11-2009 11:38 PM
тАО02-11-2009 11:38 PM
Re: Obscure "HiRes.so" problem when buidling Perl 5.8.8
Dennis, UTC0 would indeed be what most (all) users would use, but there is still an error in the code behind the scenes, and only 11.31 is barfing here.
Here is the test program that was used to expose it:
--8<--- tz.c
#include
#include
#include
#include
char *prt (struct tm *t)
{
char *timebuf = calloc (40, 1);
sprintf (timebuf, "%4d-%02d-%02d %2d:%02d:%02d",
t->tm_year + 1900, t->tm_mon + 1, t->tm_mday,
t->tm_hour, t->tm_min, t->tm_sec);
return (timebuf);
} /* prt */
int main (int arc, char *argv[])
{
char *tz[6] = { "UTC", "GMT", "UTC0UTC", "GMT0GMT", "MET", "MET-1METDST" };
int i;
time_t lt, now = time (NULL);
struct tm *tp, *lp;
for (i = 0; i < 6; i++) {
(void)printf ("%-11s ", tz[i]);
setenv ("TZ", tz[i], 1);
tzset ();
tp = localtime (&now);
lt = mktime (tp);
lp = localtime (<);
(void)printf ("%ld %s : %ld %s (%6ld)\n",
now, prt (tp), lt, prt (lp), lt - now);
}
return (0);
} /* main */
-->8---
Compile and run that on all machines you have access to, and see the difference.
--8<--- 11.31 output
UTC 1234424250 2009-02-12 7:37:30 : 1234424250 2009-02-12 7:37:30 ( 0)
GMT 1234424250 2009-02-12 7:37:30 : 1234424250 2009-02-12 7:37:30 ( 0)
UTC0UTC 1234424250 2009-02-11 21:37:30 : 1234406250 2009-02-11 21:37:30 (-18000)
GMT0GMT 1234424250 2009-02-11 21:37:30 : 1234406250 2009-02-11 21:37:30 (-18000)
MET 1234424250 2009-02-12 7:37:30 : 1234424250 2009-02-12 7:37:30 ( 0)
MET-1METDST 1234424250 2009-02-12 8:37:30 : 1234424250 2009-02-12 8:37:30 ( 0)
-->8---
Enjoy, Have FUN! H.Merijn
Here is the test program that was used to expose it:
--8<--- tz.c
#include
#include
#include
#include
char *prt (struct tm *t)
{
char *timebuf = calloc (40, 1);
sprintf (timebuf, "%4d-%02d-%02d %2d:%02d:%02d",
t->tm_year + 1900, t->tm_mon + 1, t->tm_mday,
t->tm_hour, t->tm_min, t->tm_sec);
return (timebuf);
} /* prt */
int main (int arc, char *argv[])
{
char *tz[6] = { "UTC", "GMT", "UTC0UTC", "GMT0GMT", "MET", "MET-1METDST" };
int i;
time_t lt, now = time (NULL);
struct tm *tp, *lp;
for (i = 0; i < 6; i++) {
(void)printf ("%-11s ", tz[i]);
setenv ("TZ", tz[i], 1);
tzset ();
tp = localtime (&now);
lt = mktime (tp);
lp = localtime (<);
(void)printf ("%ld %s : %ld %s (%6ld)\n",
now, prt (tp), lt, prt (lp), lt - now);
}
return (0);
} /* main */
-->8---
Compile and run that on all machines you have access to, and see the difference.
--8<--- 11.31 output
UTC 1234424250 2009-02-12 7:37:30 : 1234424250 2009-02-12 7:37:30 ( 0)
GMT 1234424250 2009-02-12 7:37:30 : 1234424250 2009-02-12 7:37:30 ( 0)
UTC0UTC 1234424250 2009-02-11 21:37:30 : 1234406250 2009-02-11 21:37:30 (-18000)
GMT0GMT 1234424250 2009-02-11 21:37:30 : 1234406250 2009-02-11 21:37:30 (-18000)
MET 1234424250 2009-02-12 7:37:30 : 1234424250 2009-02-12 7:37:30 ( 0)
MET-1METDST 1234424250 2009-02-12 8:37:30 : 1234424250 2009-02-12 8:37:30 ( 0)
-->8---
Enjoy, Have FUN! H.Merijn
Enjoy, Have FUN! H.Merijn
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-12-2009 01:56 AM
тАО02-12-2009 01:56 AM
Re: Obscure "HiRes.so" problem when buidling Perl 5.8.8
>H.Merijn: UTC0 would indeed be what most (all) users would use
None of your timezones are valid except for MET-1METDST. While UTC0UTC is syntacticly valid, it isn't semantically UTC:
$ TZ=UTC0UTC dst.pl
Sun Mar 08 01:59:59 UTC 2009 --> Sun Mar 08 03:00:00 UTC 2009
Sun Nov 01 01:59:59 UTC 2009 --> Sun Nov 01 01:00:00 UTC 2009
On my 11.31 system it works fine. Looking at the libc patch, I find PHCO_38048.
Ah, since you can only use setenv(3) on 11.31, I replaced it by putenv. Using setenv(3) causes it to fail. Not sure why only those two are bad?
None of your timezones are valid except for MET-1METDST. While UTC0UTC is syntacticly valid, it isn't semantically UTC:
$ TZ=UTC0UTC dst.pl
Sun Mar 08 01:59:59 UTC 2009 --> Sun Mar 08 03:00:00 UTC 2009
Sun Nov 01 01:59:59 UTC 2009 --> Sun Nov 01 01:00:00 UTC 2009
On my 11.31 system it works fine. Looking at the libc patch, I find PHCO_38048.
Ah, since you can only use setenv(3) on 11.31, I replaced it by putenv. Using setenv(3) causes it to fail. Not sure why only those two are bad?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-12-2009 04:15 AM
тАО02-12-2009 04:15 AM
Re: Obscure "HiRes.so" problem when buidling Perl 5.8.8
I have the same patch installed.
Changing setenv () to putenv () does not change that behaviour on my system.
FYI I have done there excercises with someone from HP, and eventually he was able to reproduce.
Enjoy, Have FUN! H.Merijn
Changing setenv () to putenv () does not change that behaviour on my system.
FYI I have done there excercises with someone from HP, and eventually he was able to reproduce.
Enjoy, Have FUN! H.Merijn
Enjoy, Have FUN! H.Merijn
- « Previous
-
- 1
- 2
- Next »
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