added device time zone support and fixed some issues