strptime on OS X always returns 0 for tm_wday and tm_yday
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Mahara |
Fix Released
|
Low
|
Aaron Wells | ||
1.10 |
Fix Released
|
Low
|
Aaron Wells | ||
1.9 |
Fix Released
|
Low
|
Unassigned | ||
15.04 |
Fix Released
|
Low
|
Aaron Wells |
Bug Description
As mentioned in this 5-year old comment on the php documentation page http://
This is apparently still true, at least on OS X. I'm running PHP 5.5.20, and these values are always set to 0.
htdocs/
I propose that this method be updated to not use tm_wday, since it doesn't need to.
```
diff --git a/htdocs/
index 26ea7d3..299bf89 100644
--- a/htdocs/
+++ b/htdocs/
@@ -336,8 +336,8 @@ function ptimetotime($ptime) {
- 1,
- $ptime['tm_yday'] + 1,
+ $ptime['tm_mon'] + 1,
+ $ptime['tm_mday'],
);
}
```
Changed in mahara: | |
importance: | Undecided → Low |
Changed in mahara: | |
status: | Fix Committed → Fix Released |
Patch for "master" branch: https:/ /reviews. mahara. org/4274