- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- daylight savings and localtime miscalculation
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
- 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
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
08-28-2003 11:11 PM
08-28-2003 11:11 PM
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-29-2003 03:30 AM
08-29-2003 03:30 AM
SolutionThis is the output I get on an 11.00 system:
$ perl -e 'print scalar localtime(1017536399)'
Sun Mar 31 01:59:59 2002[root@hpx47:/.root]
$ perl -e 'print scalar localtime(1017536400)'
Sun Mar 31 03:00:00 2002[root@hpx47:/.root]
$ perl -e 'print scalar localtime(1035680399)'
Sun Oct 27 02:59:59 2002[root@hpx47:/.root]
$ perl -e 'print scalar localtime(1035680400)'
Sun Oct 27 02:00:00 2002[root@hpx47:/.root]
Seems to be fine.
Exactly what commands are you running here?
Ollie.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-29-2003 05:29 AM
08-29-2003 05:29 AM
Re: daylight savings and localtime miscalculation
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-29-2003 05:39 AM
08-29-2003 05:39 AM
Re: daylight savings and localtime miscalculation
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-29-2003 05:57 AM
08-29-2003 05:57 AM
Re: daylight savings and localtime miscalculation
> man tztab
> echo $TZ
> more /usr/lib/tztab ; search for the definition of $TZ
and everything should become clear after.
Good luck
Adam
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-31-2003 10:37 PM
08-31-2003 10:37 PM
Re: daylight savings and localtime miscalculation
------------------------
$TZ = MET-1METDST
From 26/10/03 02:59:56 , adding 0 to 7 seconds-------
20031026025956 + 0 sec = 2003102602595600 (1067133596) -> Sun Oct 26 02:59:56 2003
20031026025956 + 1 sec = 2003102602595700 (1067133597) -> Sun Oct 26 02:59:57 2003
20031026025956 + 2 sec = 2003102602595800 (1067133598) -> Sun Oct 26 02:59:58 2003
20031026025956 + 3 sec = 2003102602595900 (1067133599) -> Sun Oct 26 02:59:59 2003
20031026025956 + 4 sec = 2003102603000000 (1067133600) -> Sun Oct 26 03:00:00 2003
20031026025956 + 5 sec = 2003102603000100 (1067133601) -> Sun Oct 26 03:00:01 2003
20031026025956 + 6 sec = 2003102603000200 (1067133602) -> Sun Oct 26 03:00:02 2003
From 26/10/03 01:59:56 , adding 3600 to 3600 seconds-
20031026015956 + 3600 sec = 2003102602595601 (1067129996) -> Sun Oct 26 02:59:56 2003
20031026015956 + 3601 sec = 2003102602595701 (1067129997) -> Sun Oct 26 02:59:57 2003
20031026015956 + 3602 sec = 2003102602595801 (1067129998) -> Sun Oct 26 02:59:58 2003
20031026015956 + 3603 sec = 2003102602595901 (1067129999) -> Sun Oct 26 02:59:59 2003
20031026015956 + 3604 sec = 2003102602000000 (1067130000) -> Sun Oct 26 02:00:00 2003
20031026015956 + 3605 sec = 2003102602000100 (1067130001) -> Sun Oct 26 02:00:01 2003
20031026015956 + 3606 sec = 2003102602000200 (1067130002) -> Sun Oct 26 02:00:02 2003
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-31-2003 11:05 PM
08-31-2003 11:05 PM
Re: daylight savings and localtime miscalculation
# Middle European Time, Middle European Time Daylight Savings Time
MET-1METDST
0 3 25-31 3 1983-2038 0 METDST-2
0 2 24-30 9 1983-1995 0 MET-1
0 2 25-31 10 1996-2038 0 MET-1
Thank you very much in advance.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-31-2003 11:27 PM
08-31-2003 11:27 PM
Re: daylight savings and localtime miscalculation
Solution: set tm_isdst to 1 before calling mktime(), it will correct this value for itself. But beware!, doing this will affect the other date change...
thanks.