I’m setting up a HighCharts line graph and the x axis labels won’t match up with the data points. The data points roll up to the whole day (no hours). When I add the pointStart, though, I’m getting the unix timestamp for when I run it:
pointStart: <?php echo strtotime("-1 month -1 day") * 1000; ?>
Can I say “give me the unix timestamp for a month and a day ago at midnight” without complicating things?
Of course you can :
<?php echo strtotime(date('Y-m-d', strtotime("-1 month -1 day"))); ?>The
date()format will remove hours minutes and seconds, then you can re-get your timestamp