Uploaded image for project: 'fix8'
  1. FX-165

time_to_epoch tm_mon ternary operator does not allow January dates to be converted to an epoch timestamp

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.0.0, 0.10.0
    • Fix Version/s: 1.0.0
    • Component/s: runtime
    • Labels:
      None
    • Branch:
      master

      Description

      There's a ternary operator used in the time_to_epoch function that sets tdays to 0 if the value in tm_mon of the time struct is 0. 0 happens to be used for January. Thus, if you try to convert a string of a date in January to an epoch timestamp, the resulting time_t value will be invalid. This tm_mon check should be removed and any parts of the codebase that rely on 0 implying "not set" instead of January should be fixed.

        Attachments

          Activity

            People

            • Assignee:
              evdubs Evan Whitmer [X] (Inactive)
              Reporter:
              evdubs Evan Whitmer [X] (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Due:
                Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - 1 hour
                1h
                Remaining:
                Remaining Estimate - 1 hour
                1h
                Logged:
                Time Spent - Not Specified
                Not Specified

                  Who's Looking?