public static function createFromFormat($format, $time, $timezone = null)
    {
        if ($timezone == null) {
            $dateTime = DateTime::createFromFormat($format, $time);
        } else {
            $dateTime = DateTime::createFromFormat($format, $time, $timezone);
        }
        return new self($dateTime, $timezone);
    }