Changeset 0071c88 for util.c


Ignore:
Timestamp:
Aug 1, 2011, 11:28:43 PM (13 years ago)
Author:
David Benjamin <davidben@mit.edu>
Children:
2e42098
Parents:
9078f69
git-author:
David Benjamin <davidben@mit.edu> (08/01/11 02:03:32)
git-committer:
David Benjamin <davidben@mit.edu> (08/01/11 23:28:43)
Message:
Restore correct semantics of message 'time' attribute

This rewrites part of 4ebbfbc5360fa004637dd101f5a0c833cdccd60a. We can't
replace every instance of ctime with a user-formatted time, as the time
attribute is not user-formatted. It is (unfortunately) the API for perl
to override the timestamp and owl_perlconfig_hashref2message expects a
particular format for strptime. We should not then flip the values
around once they reach C. (Especially not a locale-dependent one.)

Rename *_to_timestr functions to owl_util_format_* so it is clear the
function should only be used for user-formatted times.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • util.c

    rf271129 r0071c88  
    268268
    269269/* caller must free the return */
    270 CALLER_OWN char *owl_util_minutes_to_timestr(int in)
     270CALLER_OWN char *owl_util_format_minutes(int in)
    271271{
    272272  int days, hours;
     
    289289}
    290290
    291 CALLER_OWN char *owl_util_time_to_timestr(const struct tm *time)
     291CALLER_OWN char *owl_util_format_time(const struct tm *time)
    292292{
    293293  /* 32 chosen for first attempt because timestr will end up being
Note: See TracChangeset for help on using the changeset viewer.