- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The fortran routines to pack and unpack time and date values with PACKTIMEQQ and UNPACKTIMEQQ are dependend on the daylight setting of the Windows operating system. Is there a fortran procedure to avoid this setting, meaning that it allways transfers time data only into/from standard time without daylight change (only winter time)?
Routines like PXFLOCALTIME indicate the daylight savings setting by a flag, but it has no correponding routine to pack time and date into a unix timestamp.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I had this problem a few month back,http://software.intel.com/en-us/forums/topic/369084 is the thread on the subject. I wrote my own date packer and unpacker in the end to emulate the system ones but always assuming the same time offset. I can check is they are easy to share.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
[fortran]logical(4) function is_leap_year(iyear)
subroutine unpacktimecc(ipack,iyr,imon,iday,ihr,imin,isec)
subroutine packtimecc(ipack,iyr,imon,iday,ihr,imin,isec)[/fortran]
It was but three routines in a module that take/give values based on seconds since 00:00 of 1 Jan 1970 assuming no time zone offsets or daylight saving. I could post them if it is off use.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I found out, that my programme works proper if I deaktivate the "automatically adjust clock for the daylight saving time" parameter (Systemcontrol, Date and Time, Time Zone Settings). But it means, that my programme does not work reliable, it produces wrong results if it runs on a computer where this parameter is not deactivated.
If you have an own routine for the time packing I would be grateful, if you could give it to me.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I found out, that the result of time packing or unpaking depends on the TimeZoneSetting parameters in windows. If the paramter "automatically adjust clock for daylight saving" (System control / date and Time / Time Zone Settings) is deactivated, the results will be correct. But it means my programme will not work reliable on different computers, because the results depend on the individual windows parameter setting.
I would be grateful, if you could help with an own tool.
Sorry for the late reply, but it seems my previous answer was not submitted or accepted correctly.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page