- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - OpenVMS
- >
- mktime in a C program
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
Discussions
Discussions
Forums
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
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
тАО10-18-2004 08:35 AM
тАО10-18-2004 08:35 AM
A program using mktime gives a one hour drift from the system time (minus one hour).
When I ask for a time after the next time change (last Sunday of October), it is plus one hour.
Anyway, always incorrect.
I seem to recall that tzset had a relationship with that. At
http://h71000.www7.hp.com/commercial/c/docs/5763p053.html
but if somebody has an example of using tzset, it would help.
Solved! Go to Solution.
- Tags:
- mktime
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-18-2004 09:42 AM
тАО10-18-2004 09:42 AM
Re: mktime in a C program
There have been several fixes to timezones, so it would be best to get your system up to rev first.
Check what your timezones set to, then check the definitions. If the definitions are wrong, have a look at the timezone update procedures at:
http://ftp.hp.com.au
Although these are for Australian & New Zealand timezones, I'm sure you can use them as templates to fix yours.
(and if you're running DECnet+, don't forget to fix those zone definitions too!)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-18-2004 10:12 AM
тАО10-18-2004 10:12 AM
Re: mktime in a C program
Or.. it is returning UTC.
In Greenwich it one hour earlier then local for you no?
fwiw,
Hein.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-18-2004 04:44 PM
тАО10-18-2004 04:44 PM
Re: mktime in a C program
$ sh log *zone*
(LNM$PROCESS_TABLE)
(LNM$JOB_818E2080)
(LNM$GROUP_000001)
(LNM$SYSTEM_TABLE)
"SYS$TIMEZONE_DAYLIGHT_SAVING" = "1"
"SYS$TIMEZONE_DIFFERENTIAL" = "7200"
"SYS$TIMEZONE_NAME" = "MET DST"
"SYS$TIMEZONE_RULE" = "MET-1MET DST-2,M3.4.0/02,M10.5.0/03"
(LNM$SYSCLUSTER_TABLE)
(DECW$LOGICAL_NAMES)
I have found in comp.os.vms a post by David Jones which says
You've got it backwards, decc$fix_time is NOT adding the differential while
time() is subtracting it (in order to give the illusion that the system clock
is UTC). The ctime() expects its argument to be UTC and then adjusts the
displayed time returned by whatever the current timezone setting (TZSET) is.
The documentation should be clearer that decc$fix_time() does not do any
timezone adjustments, but I think it's use is discouraged anyway.
The crux of the problem is that VMS's system clock uses local time rather than
UTC. The timestamps in the file system are local time also, which causes
similar grief with the times returned in stat structures.
David L. Jones
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-18-2004 11:44 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-19-2004 12:04 AM
тАО10-19-2004 12:04 AM