Change Datetime from one time zone to another time zone in php

This is the code that i used during one of my projects to change date from Melbourne timezone to Perth datetime zone.

$mydate = $backsymbols[$i][‘symboldate’];
$date = new DateTime($mydate, new DateTimeZone(‘Australia/Melbourne’));
$date->setTimezone(new DateTimeZone(‘Australia/Perth’));
echo $date->format(‘M d, Y h:i:s A’) . “\n”;

Posted in PHP

What to do when firefox consumes lot of memory

Being a developer i noticed that my firefox consumes lot of memory once it was started. Few of the points may be helpful for you to keep the memory little free –

  • Hide the bookmark and web developer toolbar as use not quite ofently using these. (try to use shortcuts for that ctrl+b for Bookmarking and F12 for web developer tool).
  • Restart your browser with add-ons disabled and check memory consumption (MENU -> HELP -> Restart with Add-ons disabled).
  • If you are heavily using the add-ons try to uninstall and remove the unnessary add-ons/plugins.
  • You can also edit “session” options in Firefox, only if you understand the technical risks.