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().
- 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
Issue Links
- duplicates
-
CORE-1485 Use DateTime class to calculate service renew dates
- Closed
Activity
Tyson Phillips (Inactive)
created issue -
Tyson Phillips (Inactive)
made changes -
Tyson Phillips (Inactive)
made changes -
Rank | Ranked higher |
Tyson Phillips (Inactive)
made changes -
Sprint | 4.2.0 Sprint 1 [ 44 ] |
Tyson Phillips (Inactive)
made changes -
Fix Version/s | 4.2.0-b1 [ 11014 ] |
Tyson Phillips (Inactive)
made changes -
Sprint | 4.2.0 Sprint 1 [ 44 ] | 4.2.0 Sprint 2 [ 46 ] |
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 Phillips (Inactive)
made changes -
Rank | Ranked higher |
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 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 Reissmueller
made changes -
Remaining Estimate | 0 minutes [ 0 ] | |
Time Spent | 1 hour, 13 minutes [ 4380 ] | |
Worklog Id | 10342 [ 10342 ] |
Jonathan Reissmueller
made changes -
Time Spent | 1 hour, 13 minutes [ 4380 ] | 3 hours, 28 minutes [ 12480 ] |
Worklog Id | 10344 [ 10344 ] |
Jonathan Reissmueller
made changes -
Time Spent | 3 hours, 28 minutes [ 12480 ] | 4 hours, 13 minutes [ 15180 ] |
Worklog Id | 10345 [ 10345 ] |
Jonathan Reissmueller
made changes -
Time Spent | 4 hours, 13 minutes [ 15180 ] | 6 hours, 13 minutes [ 22380 ] |
Worklog Id | 10347 [ 10347 ] |
Jonathan Reissmueller
made changes -
Time Spent | 6 hours, 13 minutes [ 22380 ] | 7 hours, 36 minutes [ 27360 ] |
Worklog Id | 10356 [ 10356 ] |
Jonathan Reissmueller
made changes -
Time Spent | 7 hours, 36 minutes [ 27360 ] | 1 day, 1 hour, 18 minutes [ 33480 ] |
Worklog Id | 10360 [ 10360 ] |
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 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 Reissmueller
made changes -
Time Spent | 1 day, 2 hours, 18 minutes [ 37080 ] | 1 day, 2 hours, 54 minutes [ 39240 ] |
Worklog Id | 10412 [ 10412 ] |
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 Phillips (Inactive)
made changes -
Rank | Ranked higher |
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 Reissmueller
made changes -
Original Estimate | 0 minutes [ 0 ] | |
Security | Private [ 10000 ] |
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 ] |