Skip to main content

Posts

D3 tree chart

D3.js is a JavaScript library for controlling records in view of information. D3 encourages you to breathe life into information utilizing HTML, SVG, and CSS. D3's accentuation on web principles gives you the full capacities of present-day programs without binds yourself to a restrictive structure, consolidating ground-breaking representation parts and an information-driven way to deal with DOM control. Here I'm going to show of D3 Tree chart. D3 Tree chart helps you go in-depth of child roots. DEMO Download <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width"> <title>JS Bin</title> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script> <script src="//d3js.org/d3.v3.min.js"></script> <style> .node { cursor: pointer; } .overlay{ ...

IST to EST time conversion in PHP

IST to EST time conversion  using PHP <?php $dt = new DateTime('2011-02-22 16:15:20', new DateTimeZone('Asia/Kolkata')); echo $dt->format('r') . PHP_EOL; $dt->setTimezone(new DateTimeZone('US/Eastern')); echo $dt->format('r') . PHP_EOL; //Second example $time = new DateTime('now', new DateTimeZone('UTC')); // then convert it to IST by $time->setTimezone(new DateTimeZone('IST')); echo $dt->format('r'); ?>