Homec4science

Use a format that's support by both zend php and hphp

Authored by Jason Ge <jungejason@fb.com> on Jun 26 2012, 23:56.

Description

Use a format that's support by both zend php and hphp

Summary:
hphp doesn't support "24:00". Use "23:59:59 instead. This is causing the stat page only shows the '1 week' stat.

in hphp

hphpd> =strtotime('1 week ago')
1340143086
hphpd> =strtotime('1 week ago 24:00')

hphpd> =strtotime('1 week ago 23:59:59')
1340175599

in zend php

jungejasonmbp15:tmp jungejason$ cat timeformat.php
<?php

echo strtotime('1 week ago 24:00');
echo "\n";
echo strtotime('1 week ago 23:59:59');
echo "\n";
echo strtotime('1 week ago 24:00') - strtotime('1 week ago 23:59:59');;
echo "\n";
jungejasonmbp15:tmp jungejason$ php -f timeformat.php
1340175600
1340175599
1

Test Plan: viewed the stat page.

Reviewers: vrana, epriestley

Reviewed By: epriestley

CC: nh, aran, epriestley

Differential Revision: https://secure.phabricator.com/D2865

Details

Committed
Jason Ge <jungejason@fb.com>Jun 27 2012, 00:25
Pushed
aubortJan 31 2017, 17:16
Parents
rPH91284d17e1fe: Document arc:exec
Branches
Unknown
Tags
Unknown

Event Timeline

Jason Ge <jungejason@fb.com> committed rPHda45b09bb490: Use a format that's support by both zend php and hphp (authored by Jason Ge <jungejason@fb.com>).Jun 27 2012, 00:25