Details

    • Type: Task
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.2.0-b1
    • Component/s: None
    • Labels:
      None

      Description

      In various locations we use php's date() function, often alongside strtotime() to perform date manipulations.

      The Date helper currently uses the DateTime library for formatting dates. However, for date manipulation, we will need to allow a given date to be modified, as we do for service renewals, e.g.

      $newDate = date('c', strtotime(date('c') . ' +1 month'));
      

      The Date helper should be updated (by the time this task is ready to be done) to include a ::modify() method for allowing strtotime date modifications, e.g.:

      $newDate = $this->Date->modify($this->Date->format('c'), '+1 month', 'Y-m-d H:i:s');
      

      It will also use the timezones given to convert between rather than using the server's timezone, like with date().

      1. Update all locations where date() is referenced to use the Date helper if available. EVERY individual change must be tested
      2. Some strtotime() calls may be replaced with Date::modify instead

        Issue Links

          Activity

          tyson Tyson Phillips (Inactive) created issue -
          tyson Tyson Phillips (Inactive) made changes -
          Field Original Value New Value
          Link This issue duplicates CORE-1485 [ CORE-1485 ]
          tyson Tyson Phillips (Inactive) made changes -
          Rank Ranked higher
          tyson Tyson Phillips (Inactive) made changes -
          Sprint 4.2.0 Sprint 1 [ 44 ]
          tyson Tyson Phillips (Inactive) made changes -
          Fix Version/s 4.2.0-b1 [ 11014 ]
          tyson Tyson Phillips (Inactive) made changes -
          Sprint 4.2.0 Sprint 1 [ 44 ] 4.2.0 Sprint 2 [ 46 ]
          tyson Tyson Phillips (Inactive) made changes -
          Sprint 4.2.0 Sprint 1 [ 46 ] 4.2.0 Sprint 1, 4.2.0 Sprint 2 [ 46, 47 ]
          tyson Tyson Phillips (Inactive) made changes -
          Rank Ranked higher
          tyson Tyson Phillips (Inactive) made changes -
          Description In various locations we use php's date() function, often alongside strtotime() to perform date manipulations.

          The Date helper currently uses the DateTime library for formatting dates. However, for date manipulation, we will need to allow a given date to be modified, as we do for service renewals, e.g.
          {code}
          $newDate = date('c', strtotime(date('c') . ' +1 month'));
          {code}

          The Date helper should be updated (by the time this task is ready to be done) to include a ::modify() method for allowing strtotime date modifications, e.g.:
          {code}
          $newDate = $this->Date->modify($this->Date->format('c'), '+1 month', 'Y-m-d H:i:s');
          {code}
          It will also use the timezones given to convert between rather than using the server's timezone, like with date().

          # Update all locations where date() is referenced to use the Date helper if available. EVERY individual change must be tested
          # Some strtotime() calls may be replaced with Date::modify instead
          In various locations we use php's date() function, often alongside strtotime() to perform date manipulations.

          The Date helper currently uses the DateTime library for formatting dates. However, for date manipulation, we will need to allow a given date to be modified, as we do for service renewals, e.g.
          {code}
          $newDate = date('c', strtotime(date('c') . ' +1 month'));
          {code}

          The Date helper should be updated (by the time this task is ready to be done) to include a ::modify() method for allowing strtotime date modifications, e.g.:
          {code}
          $newDate = $this->Date->modify($this->Date->format('c'), '+1 month', 'Y-m-d H:i:s');
          {code}
          It will also use the timezones given to convert between rather than using the server's timezone, like with date().

          # Update all locations where date() is referenced to use the Date helper if available. *EVERY individual change must be tested*
          # Some strtotime() calls may be replaced with Date::modify instead
          tyson Tyson Phillips (Inactive) made changes -
          Assignee Tyson Phillips [ tyson ] Jonathan Reissmueller [ jonathan ]
          Automated transition triggered when Jonathan Reissmueller created a branch in Stash -
          Status Open [ 1 ] In Progress [ 3 ]
          jonathan Jonathan Reissmueller made changes -
          Remaining Estimate 0 minutes [ 0 ]
          Time Spent 1 hour, 13 minutes [ 4380 ]
          Worklog Id 10342 [ 10342 ]
          jonathan Jonathan Reissmueller made changes -
          Time Spent 1 hour, 13 minutes [ 4380 ] 3 hours, 28 minutes [ 12480 ]
          Worklog Id 10344 [ 10344 ]
          jonathan Jonathan Reissmueller made changes -
          Time Spent 3 hours, 28 minutes [ 12480 ] 4 hours, 13 minutes [ 15180 ]
          Worklog Id 10345 [ 10345 ]
          jonathan Jonathan Reissmueller made changes -
          Time Spent 4 hours, 13 minutes [ 15180 ] 6 hours, 13 minutes [ 22380 ]
          Worklog Id 10347 [ 10347 ]
          jonathan Jonathan Reissmueller made changes -
          Time Spent 6 hours, 13 minutes [ 22380 ] 7 hours, 36 minutes [ 27360 ]
          Worklog Id 10356 [ 10356 ]
          jonathan Jonathan Reissmueller made changes -
          Time Spent 7 hours, 36 minutes [ 27360 ] 1 day, 1 hour, 18 minutes [ 33480 ]
          Worklog Id 10360 [ 10360 ]
          jonathan Jonathan Reissmueller made changes -
          Time Spent 1 day, 1 hour, 18 minutes [ 33480 ] 1 day, 1 hour, 58 minutes [ 35880 ]
          Worklog Id 10362 [ 10362 ]
          jonathan Jonathan Reissmueller made changes -
          Time Spent 1 day, 1 hour, 58 minutes [ 35880 ] 1 day, 2 hours, 18 minutes [ 37080 ]
          Worklog Id 10364 [ 10364 ]
          Automated transition triggered when Jonathan Reissmueller created pull request #335 in Stash -
          Status In Progress [ 3 ] In Review [ 5 ]
          Resolution Fixed [ 1 ]
          jonathan Jonathan Reissmueller made changes -
          Time Spent 1 day, 2 hours, 18 minutes [ 37080 ] 1 day, 2 hours, 54 minutes [ 39240 ]
          Worklog Id 10412 [ 10412 ]
          tyson Tyson Phillips (Inactive) made changes -
          Sprint 4.2.0 Sprint 1, 4.2.0 Sprint 2 [ 46, 47 ] 4.2.0 Sprint 1, 4.2.0 Sprint 2, 4.2.0 Sprint 3 [ 46, 47, 48 ]
          tyson Tyson Phillips (Inactive) made changes -
          Rank Ranked higher
          jonathan Jonathan Reissmueller made changes -
          Time Spent 1 day, 2 hours, 54 minutes [ 39240 ] 1 day, 3 hours, 18 minutes [ 40680 ]
          Worklog Id 10430 [ 10430 ]
          jonathan Jonathan Reissmueller made changes -
          Original Estimate 0 minutes [ 0 ]
          Security Private [ 10000 ]
          jonathan Jonathan Reissmueller made changes -
          Time Spent 1 day, 3 hours, 18 minutes [ 40680 ] 1 day, 4 hours, 13 minutes [ 43980 ]
          Worklog Id 10436 [ 10436 ]
          Automated transition triggered when Tyson Phillips (Inactive) merged pull request #335 in Stash -
          Status In Review [ 5 ] Closed [ 6 ]

            People

            • Assignee:
              jonathan Jonathan Reissmueller
              Reporter:
              tyson Tyson Phillips (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Fix Release Date:
                5/Dec/17

                Time Tracking

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 1 day, 4 hours, 13 minutes
                1d 4h 13m

                  Agile