This archive contains answers to questions sent to Unidata support through mid-2025. Note that the archive is no longer being updated. We provide the archive for reference; many of the answers presented here remain technically correct, even if somewhat outdated. For the most up-to-date information on the use of NSF Unidata software and data services, please consult the Software Documentation first.
>From: address@hidden (JC Liljegren) >Organization: PNL >Keywords: 199409022152.AA11477 netCDF OS/2 MicroSoft Jim, >I have been working with netCDF files wherein time is recorded using >the Unix standard (i.e. seconds since 1-Jan-1970). Converting this to >more familiar representations (e.g. year, month, day, etc.) is no >problem on Unix systems using the built-in routine GMTIME. > >However, I would now like to read and write netCDF files on a DOS or >OS/2 computer. These systems do not have built-ins for Unix time. Microsoft C compilers going back to at least version 5 have supported the gmtime call. We use Microsoft C Version 6.0 on OS/2 systems here at Unidata to produce 16-bit executables linked against the netCDF library. We will soon be using the GNU C compiler, gcc, coupled with an emulation environment for OS/2 2.x to build 32-bit versions of netCDF routines. >Does anyone have an algorithm (preferrably coded in FORTRAN) that will >convert between Unix time and more familiar representations? > >Jim Liljegren Tom Yoksas