Home My Page Projects Code Snippets Project Openings SML/NJ
Summary Activity Forums Tracker Lists Tasks Docs Surveys News SCM Files

SCM Repository

[smlnj] Diff of /sml/branches/num64/runtime/c-libs/smlnj-date/localoffset.c
ViewVC logotype

Diff of /sml/branches/num64/runtime/c-libs/smlnj-date/localoffset.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 5363, Sun Jun 9 20:08:06 2019 UTC revision 5364, Sun Jun 9 21:30:51 2019 UTC
# Line 135  Line 135 
135    
136      Unsigned32_t localSec = WORD32_MLtoC(arg);      Unsigned32_t localSec = WORD32_MLtoC(arg);
137      secs_to_filetime (localSec, &localFT);      secs_to_filetime (localSec, &localFT);
138    SayDebug("** localOffsetForTime: localSec = %u; localFT = %#x:%08x\n",
139    localSec, localFT.dwHighDateTime, localFT.dwLowDateTime);
140      if (LocalFileTimeToFileTime (&localFT, &utcFT)) {      if (LocalFileTimeToFileTime (&localFT, &utcFT)) {
141          Unsigned32_t utcSec = filetime_to_secs (&utcFT);          Unsigned32_t utcSec = filetime_to_secs (&utcFT);
142    SayDebug("                       utcSec = %u; utcFT = %#x:%08x\n",
143    utcSec, utcFT.dwHighDateTime, utcFT.dwLowDateTime);
144        /* compute offset (UTC - local) in seconds. */        /* compute offset (UTC - local) in seconds. */
145          if (localSec <= utcSec) {          if (localSec <= utcSec) {
146    SayDebug("                       offset = %d\n", (Int32_t)(utcSec - localSec));
147              return INT32_CtoML(msp, (Int32_t)(utcSec - localSec));              return INT32_CtoML(msp, (Int32_t)(utcSec - localSec));
148          }          }
149          else {          else {
150    SayDebug("                       offset = %d\n", -(Int32_t)(localSec - utcSec));
151              return INT32_CtoML(msp, -(Int32_t)(localSec - utcSec));              return INT32_CtoML(msp, -(Int32_t)(localSec - utcSec));
152          }          }
153      }      }

Legend:
Removed from v.5363  
changed lines
  Added in v.5364

root@smlnj-gforge.cs.uchicago.edu
ViewVC Help
Powered by ViewVC 1.0.0