phabricator_format_timestamp => phabricator_datetime
Summary: make the change, kill the function. be sure to get a good $user or $viewer variable Test Plan: for each controller or view, look at it in the ui. change timezone, refresh ui and note change. i did not test the OAuthSettingsPanelController; not sure how to get to that badboy and i got a bit lazy Maniphest Tasks: T222 Reviewers: epriestley Reviewed By: epriestley CC: aran, btrahan, epriestley Maniphest Tasks: T222 Differential Revision: 1166
This commit is contained in:
@@ -81,25 +81,6 @@ function phabricator_format_relative_time($duration) {
|
||||
$precision = 0);
|
||||
}
|
||||
|
||||
function phabricator_format_timestamp($epoch) {
|
||||
$difference = (time() - $epoch);
|
||||
|
||||
if ($difference < 0) {
|
||||
$difference = -$difference;
|
||||
$relative = 'from now';
|
||||
} else {
|
||||
$relative = 'ago';
|
||||
}
|
||||
|
||||
if ($difference < 60 * 60 * 24) {
|
||||
return phabricator_format_relative_time($difference).' '.$relative;
|
||||
} else if (date('Y') == date('Y', $epoch)) {
|
||||
return date('M j, g:i A', $epoch);
|
||||
} else {
|
||||
return date('F jS, Y', $epoch);
|
||||
}
|
||||
}
|
||||
|
||||
function phabricator_format_units_generic(
|
||||
$n,
|
||||
array $scales,
|
||||
|
||||
Reference in New Issue
Block a user